public final class DecoderStream extends FilterInputStream
InputStream that provides on-the-fly decoding from an underlying
stream.
EncoderStream,
Decoder| Modifier and Type | Field and Description |
|---|---|
protected ByteBuffer |
buffer |
protected Decoder |
decoder |
in| Constructor and Description |
|---|
DecoderStream(InputStream pStream,
Decoder pDecoder)
Creates a new decoder stream and chains it to the
input stream specified by the
pStream argument. |
DecoderStream(InputStream pStream,
Decoder pDecoder,
int pBufferSize)
Creates a new decoder stream and chains it to the
input stream specified by the
pStream argument. |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
protected int |
fill()
Fills the buffer, by decoding data from the underlying input stream.
|
int |
read() |
int |
read(byte[] pBytes,
int pOffset,
int pLength) |
long |
skip(long pLength) |
close, mark, markSupported, read, resetprotected final ByteBuffer buffer
protected final Decoder decoder
public DecoderStream(InputStream pStream, Decoder pDecoder)
pStream argument.
The stream will use a default decode buffer size.pStream - the underlying input stream.pDecoder - the decoder that will be used to decode the underlying streamFilterInputStream.inpublic DecoderStream(InputStream pStream, Decoder pDecoder, int pBufferSize)
pStream argument.pStream - the underlying input stream.pDecoder - the decoder that will be used to decode the underlying streampBufferSize - the size of the decode bufferFilterInputStream.inpublic int available()
throws IOException
available in class FilterInputStreamIOExceptionpublic int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] pBytes,
int pOffset,
int pLength)
throws IOException
read in class FilterInputStreamIOExceptionpublic long skip(long pLength)
throws IOException
skip in class FilterInputStreamIOExceptionprotected int fill()
throws IOException
-1 if the end of the
file is reachedIOException - if an I/O error occursCopyright © 2017. All Rights Reserved.