Class BrotliDecoderChannel
java.lang.Object
com.aayushatharva.brotli4j.decoder.Decoder
com.aayushatharva.brotli4j.decoder.BrotliDecoderChannel
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Channel
,ReadableByteChannel
ReadableByteChannel that wraps native brotli decoder.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a BrotliDecoderChannel.BrotliDecoderChannel
(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 com.aayushatharva.brotli4j.decoder.Decoder
decompress, enableEagerOutput
-
Constructor Details
-
BrotliDecoderChannel
Creates a BrotliDecoderChannel.- Parameters:
source
- underlying source- Throws:
IOException
- If any failure during initialization
-
BrotliDecoderChannel
Creates a BrotliDecoderChannel.- Parameters:
source
- underlying sourcebufferSize
- intermediate buffer size- Throws:
IOException
- If any failure during initialization
-
-
Method Details
-
attachDictionary
- Throws:
IOException
-
isOpen
public boolean isOpen() -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChannel
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
read
- Specified by:
read
in interfaceReadableByteChannel
- Throws:
IOException
-