public class PacketDeflater
extends io.netty.handler.codec.MessageToByteEncoder<io.netty.buffer.ByteBuf>
Modifier and Type | Field and Description |
---|---|
private int |
compressionThreshold |
private byte[] |
deflateBuffer |
private Deflater |
deflater |
Constructor and Description |
---|
PacketDeflater(int int2) |
Modifier and Type | Method and Description |
---|---|
protected void |
encode(io.netty.channel.ChannelHandlerContext channelHandlerContext,
io.netty.buffer.ByteBuf byteBuf,
io.netty.buffer.ByteBuf byteBuf2) |
void |
setCompressionThreshold(int compressionThreshold) |
acceptOutboundMessage, allocateBuffer, isPreferDirect, write
bind, close, connect, deregister, disconnect, flush, read
ensureNotSharable, exceptionCaught, handlerAdded, handlerRemoved, isSharable
private final byte[] deflateBuffer
private final Deflater deflater
private int compressionThreshold
protected void encode(io.netty.channel.ChannelHandlerContext channelHandlerContext, io.netty.buffer.ByteBuf byteBuf, io.netty.buffer.ByteBuf byteBuf2) throws Exception
encode
in class io.netty.handler.codec.MessageToByteEncoder<io.netty.buffer.ByteBuf>
Exception
public void setCompressionThreshold(int compressionThreshold)