Class Decoder
java.lang.Object
org.brotli.wrapper.dec.Decoder
- Direct Known Subclasses:
BrotliDecoderChannel
Base class for InputStream / Channel implementations.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) ByteBuffer(package private) booleanprivate final DecoderJNI.Wrapper(package private) booleanprivate static final ByteBufferprivate final ReadableByteChannel -
Constructor Summary
ConstructorsConstructorDescriptionDecoder(ReadableByteChannel source, int inputBufferSize) Creates a Decoder wrapper. -
Method Summary
Modifier and TypeMethodDescription(package private) voidattachDictionary(ByteBuffer dictionary) (package private) voidclose()(package private) intconsume(ByteBuffer dst) (package private) intdecode()Continue decoding.static byte[]decompress(byte[] data) Decodes the given data buffer.(package private) voiddiscard(int length) voidprivate void
-
Field Details
-
EMPTY_BUFFER
-
source
-
decoder
-
buffer
ByteBuffer buffer -
closed
boolean closed -
eager
boolean eager
-
-
Constructor Details
-
Decoder
Creates a Decoder wrapper.- Parameters:
source- underlying sourceinputBufferSize- read buffer size- Throws:
IOException
-
-
Method Details
-
fail
- Throws:
IOException
-
attachDictionary
- Throws:
IOException
-
enableEagerOutput
public void enableEagerOutput() -
decode
Continue decoding.- Returns:
- -1 if stream is finished, or number of bytes available in read buffer (> 0)
- Throws:
IOException
-
discard
void discard(int length) -
consume
-
close
- Throws:
IOException
-
decompress
Decodes the given data buffer.- Throws:
IOException
-