StringDecoder Class — netty Architecture
Architecture documentation for the StringDecoder class in StringDecoder.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 72add2d9_6c35_d9c3_139d_2e082415a818["StringDecoder"] ef04e187_f33c_72ba_6b82_6862218e6901["StringDecoder.java"] 72add2d9_6c35_d9c3_139d_2e082415a818 -->|defined in| ef04e187_f33c_72ba_6b82_6862218e6901 e9456b9a_83f2_ce02_122e_fe1e61ad004d["StringDecoder()"] 72add2d9_6c35_d9c3_139d_2e082415a818 -->|method| e9456b9a_83f2_ce02_122e_fe1e61ad004d 1f8e9e17_3ec4_0c9c_0e89_2876d61ef9fa["decode()"] 72add2d9_6c35_d9c3_139d_2e082415a818 -->|method| 1f8e9e17_3ec4_0c9c_0e89_2876d61ef9fa
Relationship Graph
Source Code
codec-base/src/main/java/io/netty/handler/codec/string/StringDecoder.java lines 55–80
@Sharable
public class StringDecoder extends MessageToMessageDecoder<ByteBuf> {
// TODO Use CharsetDecoder instead.
private final Charset charset;
/**
* Creates a new instance with the current system character set.
*/
public StringDecoder() {
this(Charset.defaultCharset());
}
/**
* Creates a new instance with the specified character set.
*/
public StringDecoder(Charset charset) {
super(ByteBuf.class);
this.charset = ObjectUtil.checkNotNull(charset, "charset");
}
@Override
protected void decode(ChannelHandlerContext ctx, ByteBuf msg, List<Object> out) throws Exception {
out.add(msg.toString(charset));
}
}
Source
Frequently Asked Questions
What is the StringDecoder class?
StringDecoder is a class in the netty codebase, defined in codec-base/src/main/java/io/netty/handler/codec/string/StringDecoder.java.
Where is StringDecoder defined?
StringDecoder is defined in codec-base/src/main/java/io/netty/handler/codec/string/StringDecoder.java at line 55.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free