Class SnappyFrameDecoder
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.handler.codec.ByteToMessageDecoder
-
- io.netty.handler.codec.compression.SnappyFrameDecoder
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
- Direct Known Subclasses:
SnappyFramedDecoder
public class SnappyFrameDecoder extends io.netty.handler.codec.ByteToMessageDecoderUncompresses aByteBufencoded with the Snappy framing format. See Snappy framing format. Note that by default, validation of the checksum header in each chunk is DISABLED for performance improvements. If performance is less of an issue, or if you would prefer the safety that checksum validation brings, please use theSnappyFrameDecoder(boolean)constructor with the argument set totrue.
-
-
Constructor Summary
Constructors Constructor Description SnappyFrameDecoder()Creates a new snappy-framed decoder with validation of checksums turned OFF.SnappyFrameDecoder(boolean validateChecksums)Creates a new snappy-framed decoder with validation of checksums as specified.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddecode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, List<Object> out)-
Methods inherited from class io.netty.handler.codec.ByteToMessageDecoder
actualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, decodeLast, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, isSharable
-
-
-
-
Constructor Detail
-
SnappyFrameDecoder
public SnappyFrameDecoder()
Creates a new snappy-framed decoder with validation of checksums turned OFF. To turn checksum validation on, please use the alternateSnappyFrameDecoder(boolean)constructor.
-
SnappyFrameDecoder
public SnappyFrameDecoder(boolean validateChecksums)
Creates a new snappy-framed decoder with validation of checksums as specified.- Parameters:
validateChecksums- If true, the checksum field will be validated against the actual uncompressed data, and if the checksums do not match, a suitableDecompressionExceptionwill be thrown
-
-