Class BrotliEncoderChannel
java.lang.Object
com.aayushatharva.brotli4j.encoder.Encoder
com.aayushatharva.brotli4j.encoder.BrotliEncoderChannel
- All Implemented Interfaces:
Closeable, AutoCloseable, Channel, WritableByteChannel
WritableByteChannel that wraps native brotli encoder.
-
Nested Class Summary
Nested classes/interfaces inherited from class Encoder
Encoder.Mode, Encoder.Parameters -
Constructor Summary
ConstructorsConstructorDescriptionBrotliEncoderChannel(WritableByteChannel destination) Creates a BrotliEncoderChannelBrotliEncoderChannel(WritableByteChannel destination, Encoder.Parameters params) Creates a BrotliEncoderChannelBrotliEncoderChannel(WritableByteChannel destination, Encoder.Parameters params, int bufferSize) Creates a BrotliEncoderChannel -
Method Summary
Modifier and TypeMethodDescriptionvoidattachDictionary(PreparedDictionary dictionary) voidclose()booleanisOpen()intwrite(ByteBuffer src) Methods inherited from class Encoder
compress, compress, prepareDictionary
-
Constructor Details
-
BrotliEncoderChannel
public BrotliEncoderChannel(WritableByteChannel destination, Encoder.Parameters params, int bufferSize) throws IOException Creates a BrotliEncoderChannel- Parameters:
destination- underlying destinationparams- encoding settingsbufferSize- intermediate buffer size- Throws:
IOException- If any failure during initialization
-
BrotliEncoderChannel
public BrotliEncoderChannel(WritableByteChannel destination, Encoder.Parameters params) throws IOException Creates a BrotliEncoderChannel- Parameters:
destination- underlying destinationparams- encoding settings- Throws:
IOException- If any failure during initialization
-
BrotliEncoderChannel
Creates a BrotliEncoderChannel- Parameters:
destination- underlying destination- Throws:
IOException- If any failure during initialization
-
-
Method Details
-
attachDictionary
- Overrides:
attachDictionaryin classEncoder- Throws:
IOException
-
isOpen
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Throws:
IOException
-
write
- Specified by:
writein interfaceWritableByteChannel- Throws:
IOException
-