Class LineDelimiter


  • public class LineDelimiter
    extends java.lang.Object
    A delimiter which is appended to the end of a text line, such as CR/LF. This class defines default delimiters for various OS :
    • Unix/Linux : LineDelimiter.UNIX ("\n")
    • Windows : LineDelimiter.WINDOWS ("\r\n")
    • MAC : LineDelimiter.MAC ("\r")
    Author:
    Apache MINA Project
    • Constructor Summary

      Constructors 
      Constructor Description
      LineDelimiter​(java.lang.String value)
      Creates a new line delimiter with the specified value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)
      java.lang.String getValue()  
      int hashCode()
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • DEFAULT

        public static final LineDelimiter DEFAULT
        the line delimiter constant of the current O/S.
      • AUTO

        public static final LineDelimiter AUTO
        A special line delimiter which is used for auto-detection of EOL in TextLineDecoder. If this delimiter is used, TextLineDecoder will consider both '\r' and '\n' as a delimiter.
      • CRLF

        public static final LineDelimiter CRLF
        The CRLF line delimiter constant ("\r\n")
      • UNIX

        public static final LineDelimiter UNIX
        The line delimiter constant of UNIX ("\n")
      • WINDOWS

        public static final LineDelimiter WINDOWS
        The line delimiter constant of MS Windows/DOS ("\r\n")
      • MAC

        public static final LineDelimiter MAC
        The line delimiter constant of Mac OS ("\r")
      • NUL

        public static final LineDelimiter NUL
        The line delimiter constant for NUL-terminated text protocols such as Flash XML socket ("\0")
    • Constructor Detail

      • LineDelimiter

        public LineDelimiter​(java.lang.String value)
        Creates a new line delimiter with the specified value.
        Parameters:
        value - The new Line Delimiter
    • Method Detail

      • getValue

        public java.lang.String getValue()
        Returns:
        the delimiter string.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object