public final class DecoderStream
extends java.io.FilterInputStream
InputStream that provides on-the-fly decoding from an underlying
stream.
EncoderStream,
Decoder| Modifier and Type | Field and Description |
|---|---|
protected java.nio.ByteBuffer |
buffer |
protected Decoder |
decoder |
| Constructor and Description |
|---|
DecoderStream(java.io.InputStream pStream,
Decoder pDecoder)
Creates a new decoder stream and chains it to the
input stream specified by the
pStream argument. |
DecoderStream(java.io.InputStream pStream,
Decoder pDecoder,
int pBufferSize)
Creates a new decoder stream and chains it to the
input stream specified by the
pStream argument. |
protected final java.nio.ByteBuffer buffer
protected final Decoder decoder
public DecoderStream(java.io.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(java.io.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 java.io.IOException
available in class java.io.FilterInputStreamjava.io.IOExceptionpublic int read()
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic int read(byte[] pBytes,
int pOffset,
int pLength)
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic long skip(long pLength)
throws java.io.IOException
skip in class java.io.FilterInputStreamjava.io.IOExceptionprotected int fill()
throws java.io.IOException
-1 if the end of the
file is reachedjava.io.IOException - if an I/O error occursCopyright © 2018. All Rights Reserved.