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, writebind, close, connect, deregister, disconnect, flush, readensureNotSharable, exceptionCaught, handlerAdded, handlerRemoved, isSharableprivate 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>Exceptionpublic void setCompressionThreshold(int compressionThreshold)