Class BrotliDecoderChannel
java.lang.Object
org.brotli.wrapper.dec.Decoder
org.brotli.wrapper.dec.BrotliDecoderChannel
- All Implemented Interfaces:
Closeable, AutoCloseable, Channel, ReadableByteChannel
ReadableByteChannel that wraps native brotli decoder.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intThe default internal buffer size used by the decoder.private final Object -
Constructor Summary
ConstructorsConstructorDescriptionBrotliDecoderChannel(ReadableByteChannel source, int bufferSize) Creates a BrotliDecoderChannel. -
Method Summary
Modifier and TypeMethodDescriptionvoidattachDictionary(ByteBuffer dictionary) voidclose()booleanisOpen()intread(ByteBuffer dst) Methods inherited from class Decoder
consume, decode, decompress, discard, enableEagerOutput
-
Field Details
-
DEFAULT_BUFFER_SIZE
private static final int DEFAULT_BUFFER_SIZEThe default internal buffer size used by the decoder.- See Also:
-
mutex
-
-
Constructor Details
-
BrotliDecoderChannel
Creates a BrotliDecoderChannel.- Parameters:
source- underlying sourcebufferSize- intermediate buffer sizecustomDictionary- initial LZ77 dictionary- Throws:
IOException
-
BrotliDecoderChannel
- Throws:
IOException
-
-
Method Details
-
attachDictionary
- Overrides:
attachDictionaryin classDecoder- Throws:
IOException
-
isOpen
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Overrides:
closein classDecoder- Throws:
IOException
-
read
- Specified by:
readin interfaceReadableByteChannel- Throws:
IOException
-