Class FixedLengthFrameDecoder

  • All Implemented Interfaces:
    ChannelHandler, ChannelInboundHandler

    public class FixedLengthFrameDecoder
    extends ByteToMessageDecoder
    A decoder that splits the received ByteBufs 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 |
     +-----+-----+-----+
     
    • Constructor Detail

      • FixedLengthFrameDecoder

        public FixedLengthFrameDecoder​(int frameLength)
        Creates a new instance.
        Parameters:
        frameLength - the length of the frame