Buffers by the fixed number
of bytes. For example, if you received the following four fragmented packets:
+---+----+------+----+ | A | BC | DEFG | HI | +---+----+------+----+A
FixedLengthFrameDecoder(3) will decode them into the
following three packets with the fixed length:
+-----+-----+-----+ | ABC | DEF | GHI | +-----+-----+-----+
| Modifier and Type | Field and Description |
|---|---|
| private final int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | FixedLengthFrameDecoder(int
the length of the frame frameLength, ByteToMessageDecoder.Creates a new instance. |
| Modifier and Type | Method and Description |
|---|---|
| protected final void | decode(ChannelHandlerContext
the ctx, Buffer ChannelHandlerContext which this ByteToMessageDecoder belongs tothe in)Buffer from which to read dataImplements abstract io. Buffer to another.
|
| protected Object | decode0(ChannelHandlerContext
the ctx, Buffer ChannelHandlerContext which this ByteToMessageDecoder belongs tothe in)Buffer from which to read dataCreate a frame out of the |
| frameLength | back to summary |
|---|---|
| private final int frameLength | |
| FixedLengthFrameDecoder | back to summary |
|---|---|
| public FixedLengthFrameDecoder(int frameLength) Creates a new instance.
| |
| FixedLengthFrameDecoder | back to summary |
|---|---|
| public FixedLengthFrameDecoder(int frameLength, ByteToMessageDecoder. Creates a new instance.
| |
| decode | back to summary |
|---|---|
| protected final void decode(ChannelHandlerContext ctx, Buffer in) throws Exception Implements abstract io. Doc from io. Decode the from one
| |
| decode0 | back to summary |
|---|---|
| protected Object decode0(ChannelHandlerContext ctx, Buffer in) throws Exception Create a frame out of the
| |