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
FieldsModifier and TypeFieldDescriptionstatic final LineSeparatorThe default line separator in the current system.static final LineSeparatorThe Unix line separator(LF)private final java.lang.Stringstatic final LineSeparatorThe Windows line separator(CRLF) -
Constructor Summary
ConstructorsConstructorDescriptionLineSeparator(java.lang.String lineSeparator) CreateLineSeparatorwith the specifiedlineSeparatorstring. -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
DEFAULT
The default line separator in the current system. -
UNIX
The Unix line separator(LF) -
WINDOWS
The Windows line separator(CRLF) -
value
private final java.lang.String value
-
-
Constructor Details
-
LineSeparator
public LineSeparator(java.lang.String lineSeparator) CreateLineSeparatorwith the specifiedlineSeparatorstring.
-
-
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:
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
-