|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
edu.vt.middleware.crypt.io.AbstractEncodingFilterInputStream
public abstract class AbstractEncodingFilterInputStream
Abstract base class for filter input streams that decode encoded character bytes into raw bytes.
| Field Summary | |
|---|---|
protected byte[] |
byteBuffer
Holds bytes encoded bytes read from input stream. |
protected static int |
CHUNK_SIZE
Number of encoded bytes to read in one buffer filling round. |
protected DirectByteArrayOutputStream |
decodeBuffer
Buffer containing decoded bytes. |
protected int |
position
Position in decoded byte buffer. |
| Fields inherited from class java.io.FilterInputStream |
|---|
in |
| Constructor Summary | |
|---|---|
protected |
AbstractEncodingFilterInputStream(InputStream in)
Creates an input filter that decodes characters in the given input stream. |
| Method Summary | |
|---|---|
protected abstract void |
fillBuffer()
Reads characters from the input reader and decodes them to fill decodeBuffer. |
protected abstract int |
getDecodeBufferCapacity()
Gets the encoder that decodes encoded character data in the input stream to raw bytes. |
int |
read()
|
int |
read(byte[] b)
|
int |
read(byte[] b,
int off,
int len)
|
| Methods inherited from class java.io.FilterInputStream |
|---|
available, close, mark, markSupported, reset, skip |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int CHUNK_SIZE
protected final DirectByteArrayOutputStream decodeBuffer
protected final byte[] byteBuffer
protected int position
| Constructor Detail |
|---|
protected AbstractEncodingFilterInputStream(InputStream in)
in - Input stream to wrap.| Method Detail |
|---|
public int read()
throws IOException
read in class FilterInputStreamIOException
public int read(byte[] b)
throws IOException
read in class FilterInputStreamIOException
public int read(byte[] b,
int off,
int len)
throws IOException
read in class FilterInputStreamIOExceptionprotected abstract int getDecodeBufferCapacity()
protected abstract void fillBuffer()
throws IOException
decodeBuffer.
IOException - On read errors.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||