Class TextLineEncoder

java.lang.Object
org.apache.mina.filter.codec.ProtocolEncoderAdapter
org.apache.mina.filter.codec.textline.TextLineEncoder
All Implemented Interfaces:
ProtocolEncoder

public class TextLineEncoder extends ProtocolEncoderAdapter
A ProtocolEncoder which encodes a string into a text line which ends with the delimiter.
  • Field Details

    • ENCODER

      private static final AttributeKey ENCODER
    • charset

      private final Charset charset
    • delimiter

      private final LineDelimiter delimiter
    • maxLineLength

      private int maxLineLength
  • Constructor Details

    • TextLineEncoder

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

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

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

      public TextLineEncoder(Charset charset)
      Creates a new instance with the specified charset and LineDelimiter.UNIX delimiter.
      Parameters:
      charset - The Charset to use
    • TextLineEncoder

      public TextLineEncoder(Charset charset, String 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
    • TextLineEncoder

      public TextLineEncoder(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