Package org.brotli.wrapper.dec
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 int
The 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 TypeMethodDescriptionvoid
attachDictionary
(ByteBuffer dictionary) void
close()
boolean
isOpen()
int
read
(ByteBuffer dst) Methods inherited from class org.brotli.wrapper.dec.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:
attachDictionary
in classDecoder
- Throws:
IOException
-
isOpen
public boolean isOpen() -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChannel
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classDecoder
- Throws:
IOException
-
read
- Specified by:
read
in interfaceReadableByteChannel
- Throws:
IOException
-