public class ProtobufVarint32FrameDecoder extends ByteToMessageDecoder
ByteBufs dynamically by the
value of the Google Protocol Buffers
Base
128 Varints integer length field in the message. For example:
BEFORE DECODE (302 bytes) AFTER DECODE (300 bytes) +--------+---------------+ +---------------+ | Length | Protobuf Data |----->| Protobuf Data | | 0xAC02 | (300 bytes) | | (300 bytes) | +--------+---------------+ +---------------+
CodedInputStream| Constructor and Description |
|---|
ProtobufVarint32FrameDecoder() |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
decode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf in)
Decode the from one
ByteBuf to an other. |
callDecode, channelInactive, channelReadSuspended, decodeLast, inboundBufferUpdated, isSingleDecode, setSingleDecodediscardInboundReadBytes, freeInboundBuffer, inboundBufferUpdated, newInboundBufferchannelActive, channelRegistered, channelUnregisteredafterAdd, afterRemove, beforeAdd, beforeRemove, exceptionCaught, userEventTriggeredclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected Object decode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in) throws Exception
ByteToMessageDecoderByteBuf to an other. This method will be called till either the input
ByteBuf has nothing to read anymore, till nothing was read from the input ByteBuf or till
this method returns null.decode in class ByteToMessageDecoderctx - the ChannelHandlerContext which this ByteToByteDecoder belongs toin - the ByteBuf from which to read dataByteBuf was decoded, or null if
there was not enough data left in the ByteBuf to decode.Exception - is thrown if an error accourCopyright © 2008-2013 The Netty Project. All Rights Reserved.