Package io.netty.handler.codec.string
Class LineSeparator
- java.lang.Object
-
- io.netty.handler.codec.string.LineSeparator
-
public final class LineSeparator extends java.lang.ObjectA class to represent line separators in different environments.
-
-
Field Summary
Fields Modifier and Type Field Description static LineSeparatorDEFAULTThe default line separator in the current system.static LineSeparatorUNIXThe Unix line separator(LF)static LineSeparatorWINDOWSThe Windows line separator(CRLF)
-
Constructor Summary
Constructors Constructor Description LineSeparator(java.lang.String lineSeparator)CreateLineSeparatorwith the specifiedlineSeparatorstring.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)inthashCode()java.lang.StringtoString()Return a hex dump of the line separator in UTF-8 encoding.java.lang.Stringvalue()Return the string value of this line separator.
-
-
-
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)
CreateLineSeparatorwith the specifiedlineSeparatorstring.
-
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
Return a hex dump of the line separator in UTF-8 encoding.- Overrides:
toStringin classjava.lang.Object
-
-