Class BrotliEncoder.Writer
java.lang.Object
io.netty.handler.codec.compression.BrotliEncoder.Writer
- All Implemented Interfaces:
Closeable, AutoCloseable, Channel, WritableByteChannel
- Enclosing class:
BrotliEncoder
BrotliEncoder.Writer is the implementation of WritableByteChannel which encodes
Brotli data and stores it into ByteBuf.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.aayushatharva.brotli4j.encoder.BrotliEncoderChannelprivate booleanprivate final ChannelHandlerContextprivate booleanprivate ByteBuf -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateWriter(com.aayushatharva.brotli4j.encoder.Encoder.Parameters parameters, ChannelHandlerContext ctx) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidallocate(boolean preferDirect) voidclose()private voidvoidfinish(ChannelPromise promise) booleanisOpen()intwrite(ByteBuffer src)
-
Field Details
-
writableBuffer
-
brotliEncoderChannel
private final com.aayushatharva.brotli4j.encoder.BrotliEncoderChannel brotliEncoderChannel -
ctx
-
closeInitiated
private boolean closeInitiated -
isClosed
private boolean isClosed
-
-
Constructor Details
-
Writer
private Writer(com.aayushatharva.brotli4j.encoder.Encoder.Parameters parameters, ChannelHandlerContext ctx) throws IOException - Throws:
IOException
-
-
Method Details
-
encode
-
allocate
private void allocate(boolean preferDirect) -
write
- Specified by:
writein interfaceWritableByteChannel- Throws:
IOException
-
isOpen
-
close
-
finish
- Throws:
IOException
-