Class LineSeparator

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

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

    Fields
    Modifier and Type
    Field
    Description
    static final LineSeparator
    The default line separator in the current system.
    static final LineSeparator
    The Unix line separator(LF)
    private final java.lang.String
     
    static final LineSeparator
    The Windows line separator(CRLF)
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    boolean
    equals(java.lang.Object o)
     
    int
     
    java.lang.String
    Return a hex dump of the line separator in UTF-8 encoding.
    java.lang.String
    Return the string value of this line separator.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 java.lang.String value
  • Constructor Details

    • LineSeparator

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

    • 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