Class LineSeparator

java.lang.Object
io.netty.handler.codec.string.LineSeparator

public final class LineSeparator extends Object
A class to represent line separators in different environments.
  • Field Details

    • 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)
    • value

      private final String value
  • Constructor Details

    • LineSeparator

      public LineSeparator(String lineSeparator)
      Create LineSeparator with the specified lineSeparator string.
  • Method Details

    • value

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

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