edu.vt.middleware.crypt.io
Class AbstractEncodingFilterOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
edu.vt.middleware.crypt.io.AbstractEncodingFilterOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
- Direct Known Subclasses:
- Base64FilterOutputStream, HexFilterOutputStream
public abstract class AbstractEncodingFilterOutputStream
- extends FilterOutputStream
Abstract base class for filter output streams that convert raw bytes into
encoded characters.
- Version:
- $Revision: 2744 $
- Author:
- Middleware Services
|
Method Summary |
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
protected abstract void |
writeEncoded(byte[] data,
int offset,
int length)
Encode the given raw bytes and write the result to the wrapped output
stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractEncodingFilterOutputStream
protected AbstractEncodingFilterOutputStream(OutputStream out)
- Creates an output filter that encodes raw bytes into encoded character
bytes in the wrapped output stream.
- Parameters:
out - Output stream to wrap.
write
public void write(int b)
throws IOException
-
- Overrides:
write in class FilterOutputStream
- Throws:
IOException
write
public void write(byte[] b)
throws IOException
-
- Overrides:
write in class FilterOutputStream
- Throws:
IOException
write
public void write(byte[] b,
int off,
int len)
throws IOException
-
- Overrides:
write in class FilterOutputStream
- Throws:
IOException
writeEncoded
protected abstract void writeEncoded(byte[] data,
int offset,
int length)
throws IOException
- Encode the given raw bytes and write the result to the wrapped output
stream.
- Parameters:
data - Raw bytes to be encoded and written.offset - Starting index of data to be written in input byte array.length - Number of bytes to be written from input byte array.
- Throws:
IOException - On write errors.
Copyright © 2003-2013 Virginia Tech. All Rights Reserved.