testCustomEncoding() — netty Function Reference
Architecture documentation for the testCustomEncoding() function in HttpContentCompressorTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD c90af082_4231_93bd_4d6c_811003bfd4a2["testCustomEncoding()"] 32ab04b0_6c83_d4f7_6483_fd304f908331["HttpContentCompressorTest"] c90af082_4231_93bd_4d6c_811003bfd4a2 -->|defined in| 32ab04b0_6c83_d4f7_6483_fd304f908331 bdf032ba_93a9_0f83_122a_c24ea71efa75["release()"] c90af082_4231_93bd_4d6c_811003bfd4a2 -->|calls| bdf032ba_93a9_0f83_122a_c24ea71efa75 style c90af082_4231_93bd_4d6c_811003bfd4a2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/test/java/io/netty/handler/codec/http/HttpContentCompressorTest.java lines 788–808
@Test
public void testCustomEncoding() throws Exception {
EmbeddedChannel ch = new EmbeddedChannel(new HttpContentCompressor());
assertTrue(ch.writeInbound(newRequest()));
FullHttpResponse res = new DefaultFullHttpResponse(
HttpVersion.HTTP_1_1, HttpResponseStatus.OK,
Unpooled.copiedBuffer("Hello, World", CharsetUtil.US_ASCII));
int len = res.content().readableBytes();
res.headers().set(HttpHeaderNames.CONTENT_LENGTH, len);
res.headers().set(HttpHeaderNames.CONTENT_ENCODING, "ascii");
assertTrue(ch.writeOutbound(res));
FullHttpResponse response = ch.readOutbound();
assertEquals(String.valueOf(len), response.headers().get(HttpHeaderNames.CONTENT_LENGTH));
assertEquals("ascii", response.headers().get(HttpHeaderNames.CONTENT_ENCODING));
assertEquals("Hello, World", response.content().toString(CharsetUtil.US_ASCII));
response.release();
assertTrue(ch.finishAndReleaseAll());
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does testCustomEncoding() do?
testCustomEncoding() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentCompressorTest.java.
Where is testCustomEncoding() defined?
testCustomEncoding() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentCompressorTest.java at line 788.
What does testCustomEncoding() call?
testCustomEncoding() calls 1 function(s): release.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free