Class TextLineDecoder

java.lang.Object
org.apache.mina.filter.codec.textline.TextLineDecoder
All Implemented Interfaces:
ProtocolDecoder

public class TextLineDecoder extends Object implements ProtocolDecoder
A ProtocolDecoder which decodes a text line into a string.
  • Field Details

    • CONTEXT

      private static final AttributeKey CONTEXT
    • charset

      private final Charset charset
    • delimiter

      private final LineDelimiter delimiter
      The delimiter used to determinate when a line has been fully decoded
    • delimBuf

      private IoBuffer delimBuf
      An IoBuffer containing the delimiter
    • maxLineLength

      private int maxLineLength
      The default maximum Line length. Default to 1024.
    • bufferLength

      private int bufferLength
      The default maximum buffer length. Default to 128 chars.
  • Constructor Details

    • TextLineDecoder

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

      public TextLineDecoder(String delimiter)
      Creates a new instance with the current default Charset and the specified delimiter.
      Parameters:
      delimiter - The line delimiter to use
    • TextLineDecoder

      public TextLineDecoder(LineDelimiter delimiter)
      Creates a new instance with the current default Charset and the specified delimiter.
      Parameters:
      delimiter - The line delimiter to use
    • TextLineDecoder

      public TextLineDecoder(Charset charset)
      Creates a new instance with the spcified charset and LineDelimiter.AUTO delimiter.
      Parameters:
      charset - The Charset to use
    • TextLineDecoder

      public TextLineDecoder(Charset charset, String delimiter)
      Creates a new instance with the spcified charset and the specified delimiter.
      Parameters:
      charset - The Charset to use
      delimiter - The line delimiter to use
    • TextLineDecoder

      public TextLineDecoder(Charset charset, LineDelimiter delimiter)
      Creates a new instance with the specified charset and the specified delimiter.
      Parameters:
      charset - The Charset to use
      delimiter - The line delimiter to use
  • Method Details