Class LineSeparator


  • public final class LineSeparator
    extends java.lang.Object
    A class to represent line separators in different environments.
    • Constructor Summary

      Constructors 
      Constructor Description
      LineSeparator​(java.lang.String lineSeparator)
      Create LineSeparator with the specified lineSeparator string.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      java.lang.String toString()
      Return a hex dump of the line separator in UTF-8 encoding.
      java.lang.String value()
      Return the string value of this line separator.
      • Methods inherited from class java.lang.Object

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

      • DEFAULT

        public static final LineSeparator DEFAULT
        The default line separator in the current system.
      • UNIX

        public static final LineSeparator UNIX
        The Unix line separator(LF)
      • WINDOWS

        public static final LineSeparator WINDOWS
        The Windows line separator(CRLF)
    • Constructor Detail

      • LineSeparator

        public LineSeparator​(java.lang.String lineSeparator)
        Create LineSeparator with the specified lineSeparator string.
    • Method Detail

      • value

        public java.lang.String value()
        Return the string value of this line separator.
      • equals

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

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

        public java.lang.String toString()
        Return a hex dump of the line separator in UTF-8 encoding.
        Overrides:
        toString in class java.lang.Object