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.BrotliDecoderChannel(ReadableByteChannel source, int bufferSize, int maxOutputChunkSize) Creates a BrotliDecoderChannel with a per-pull output cap. -
Method Summary
Modifier and TypeMethodDescriptionvoidattachDictionary(ByteBuffer dictionary) voidclose()booleanisOpen()intread(ByteBuffer dst) Methods inherited from class Decoder
decompress, decompress, decompress, 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
-
BrotliDecoderChannel
public BrotliDecoderChannel(ReadableByteChannel source, int bufferSize, int maxOutputChunkSize) throws IOException Creates a BrotliDecoderChannel with a per-pull output cap.- Parameters:
source- underlying sourcebufferSize- intermediate buffer sizemaxOutputChunkSize- per-pull output cap in bytes;0for no cap- Throws:
IOException- If any failure during initialization
-
-
Method Details
-
attachDictionary
- 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
-