public class SnappyFramedDecoder extends ByteToByteDecoder
ByteBuf
encoded with the Snappy framing format.
See http://code.google.com/p/snappy/source/browse/trunk/framing_format.txtConstructor and Description |
---|
SnappyFramedDecoder()
Creates a new snappy-framed decoder with validation of checksums
turned off
|
SnappyFramedDecoder(boolean validateChecksums)
Creates a new snappy-framed decoder with validation of checksums
as specified.
|
Modifier and Type | Method and Description |
---|---|
protected void |
decode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf in,
io.netty.buffer.ByteBuf out)
Decode the from one
ByteBuf to an other. |
channelInactive, decodeLast, inboundBufferUpdated, isSingleDecode, setSingleDecode
discardInboundReadBytes, inboundBufferUpdated, newInboundBuffer
channelActive, channelReadSuspended, channelRegistered, channelUnregistered, userEventTriggered
exceptionCaught, handlerAdded, handlerRemoved
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public SnappyFramedDecoder()
public SnappyFramedDecoder(boolean validateChecksums)
validateChecksums
- If true, the checksum field will be validated against the actual
uncompressed data, and if the checksums do not match, a suitable
CompressionException
will be thrownprotected void decode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, io.netty.buffer.ByteBuf out) throws Exception
ByteToByteDecoder
ByteBuf
to an other. This method will be called till either the input
ByteBuf
has nothing to read anymore or till nothing was read from the input ByteBuf
.decode
in class ByteToByteDecoder
ctx
- the ChannelHandlerContext
which this ByteToByteDecoder
belongs toin
- the ByteBuf
from which to read dataout
- the ByteBuf
to which the decoded data will be writtenException
- is thrown if an error accourCopyright © 2008-2013 The Netty Project. All Rights Reserved.