TestEncoder Class — netty Architecture
Architecture documentation for the TestEncoder class in HttpContentEncoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 90a4f9a7_9601_fd7b_fd3a_66866a8f8db8["TestEncoder"] 8d0422ab_2ced_50d4_047e_96ead2603b15["HttpContentEncoderTest.java"] 90a4f9a7_9601_fd7b_fd3a_66866a8f8db8 -->|defined in| 8d0422ab_2ced_50d4_047e_96ead2603b15 3e159726_d4de_b803_503c_08f4468c3872["Result()"] 90a4f9a7_9601_fd7b_fd3a_66866a8f8db8 -->|method| 3e159726_d4de_b803_503c_08f4468c3872
Relationship Graph
Source Code
codec-http/src/test/java/io/netty/handler/codec/http/HttpContentEncoderTest.java lines 46–57
private static final class TestEncoder extends HttpContentEncoder {
@Override
protected Result beginEncode(HttpResponse httpResponse, String acceptEncoding) {
return new Result("test", new EmbeddedChannel(new MessageToByteEncoder<ByteBuf>() {
@Override
protected void encode(ChannelHandlerContext ctx, ByteBuf in, ByteBuf out) throws Exception {
out.writeBytes(String.valueOf(in.readableBytes()).getBytes(CharsetUtil.US_ASCII));
in.skipBytes(in.readableBytes());
}
}));
}
}
Source
Frequently Asked Questions
What is the TestEncoder class?
TestEncoder is a class in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentEncoderTest.java.
Where is TestEncoder defined?
TestEncoder is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentEncoderTest.java at line 46.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free