LineSeparator Class — netty Architecture
Architecture documentation for the LineSeparator class in LineSeparator.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 8a403f0b_3a1f_94c3_2194_7408425f6cbe["LineSeparator"] 87151c86_a0dc_828a_7730_35b5b80c3e9e["LineSeparator.java"] 8a403f0b_3a1f_94c3_2194_7408425f6cbe -->|defined in| 87151c86_a0dc_828a_7730_35b5b80c3e9e e410eff9_589c_9863_7314_b82e7b6d32e6["LineSeparator()"] 8a403f0b_3a1f_94c3_2194_7408425f6cbe -->|method| e410eff9_589c_9863_7314_b82e7b6d32e6 07a6267d_fc78_b6e2_aad0_21f08a36ae2f["String()"] 8a403f0b_3a1f_94c3_2194_7408425f6cbe -->|method| 07a6267d_fc78_b6e2_aad0_21f08a36ae2f f975c802_c87a_ac8f_1dba_b4cce782a8ad["equals()"] 8a403f0b_3a1f_94c3_2194_7408425f6cbe -->|method| f975c802_c87a_ac8f_1dba_b4cce782a8ad f95e3f10_7f32_4f4b_9e6c_c331fff72dc0["hashCode()"] 8a403f0b_3a1f_94c3_2194_7408425f6cbe -->|method| f95e3f10_7f32_4f4b_9e6c_c331fff72dc0
Relationship Graph
Source Code
codec-base/src/main/java/io/netty/handler/codec/string/LineSeparator.java lines 26–83
public final class LineSeparator {
/**
* The default line separator in the current system.
*/
public static final LineSeparator DEFAULT = new LineSeparator(StringUtil.NEWLINE);
/**
* The Unix line separator(LF)
*/
public static final LineSeparator UNIX = new LineSeparator("\n");
/**
* The Windows line separator(CRLF)
*/
public static final LineSeparator WINDOWS = new LineSeparator("\r\n");
private final String value;
/**
* Create {@link LineSeparator} with the specified {@code lineSeparator} string.
*/
public LineSeparator(String lineSeparator) {
this.value = ObjectUtil.checkNotNull(lineSeparator, "lineSeparator");
}
/**
* Return the string value of this line separator.
*/
public String value() {
return value;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof LineSeparator)) {
return false;
}
LineSeparator that = (LineSeparator) o;
return value != null ? value.equals(that.value) : that.value == null;
}
@Override
public int hashCode() {
return value != null ? value.hashCode() : 0;
}
/**
* Return a <a href="https://en.wikipedia.org/wiki/Hex_dump">hex dump</a> of the line separator in UTF-8 encoding.
*/
@Override
public String toString() {
return ByteBufUtil.hexDump(value.getBytes(CharsetUtil.UTF_8));
}
}
Source
Frequently Asked Questions
What is the LineSeparator class?
LineSeparator is a class in the netty codebase, defined in codec-base/src/main/java/io/netty/handler/codec/string/LineSeparator.java.
Where is LineSeparator defined?
LineSeparator is defined in codec-base/src/main/java/io/netty/handler/codec/string/LineSeparator.java at line 26.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free