Class TextLineDecoder

    • Constructor Detail

      • TextLineDecoder

        public TextLineDecoder()
        Creates a new instance with the current default Charset and LineDelimiter.AUTO delimiter.
      • TextLineDecoder

        public TextLineDecoder​(java.nio.charset.Charset charset)
        Creates a new instance with the spcified charset and LineDelimiter.AUTO delimiter.
      • TextLineDecoder

        public TextLineDecoder​(java.nio.charset.Charset charset,
                               LineDelimiter delimiter)
        Creates a new instance with the specified charset and the specified delimiter.
    • Method Detail

      • getMaxLineLength

        public int getMaxLineLength()
        Returns the allowed maximum size of the line to be decoded. If the size of the line to be decoded exceeds this value, the decoder will throw a BufferDataException. The default value is 1024 (1KB).
      • setMaxLineLength

        public void setMaxLineLength​(int maxLineLength)
        Sets the allowed maximum size of the line to be decoded. If the size of the line to be decoded exceeds this value, the decoder will throw a BufferDataException. The default value is 1024 (1KB).
      • dispose

        public void dispose​(IoSession session)
                     throws java.lang.Exception
        Description copied from interface: ProtocolDecoder
        Releases all resources related with this decoder.
        Specified by:
        dispose in interface ProtocolDecoder
        Throws:
        java.lang.Exception - if failed to dispose all resources