Interface ByteToMessageDecoder.Cumulator

    • Method Detail

      • discardSomeReadBytes

        Buffer discardSomeReadBytes​(Buffer cumulation)
        Consume the given buffer and return a new buffer with the same readable data, but where any data before the read offset may have been removed. The returned buffer may be the same buffer instance as the buffer passed in.
        Parameters:
        cumulation - The buffer we wish to trim already processed bytes from.
        Returns:
        A buffer where the bytes before the reader-offset have been removed.