testEmptyContents() — netty Function Reference
Architecture documentation for the testEmptyContents() function in HttpResponseEncoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD cad266a5_0255_3b42_a0c4_169f3ed867cc["testEmptyContents()"] 9235a1ad_cba8_50c2_25b1_57ce61f5b623["HttpResponseEncoderTest"] cad266a5_0255_3b42_a0c4_169f3ed867cc -->|defined in| 9235a1ad_cba8_50c2_25b1_57ce61f5b623 8cc7ac13_ef5b_4125_e7fb_0934e2eff18f["testEmptyContentsChunked()"] 8cc7ac13_ef5b_4125_e7fb_0934e2eff18f -->|calls| cad266a5_0255_3b42_a0c4_169f3ed867cc d90e4a5b_0f04_5b91_f528_4320046e9c79["testEmptyContentsChunkedWithTrailers()"] d90e4a5b_0f04_5b91_f528_4320046e9c79 -->|calls| cad266a5_0255_3b42_a0c4_169f3ed867cc a97676f7_fc90_8520_4218_68818c77675e["testEmptyContentsNotChunked()"] a97676f7_fc90_8520_4218_68818c77675e -->|calls| cad266a5_0255_3b42_a0c4_169f3ed867cc 07405843_5dd0_93fc_5536_8dac5170dc2e["testEmptyContentNotsChunkedWithTrailers()"] 07405843_5dd0_93fc_5536_8dac5170dc2e -->|calls| cad266a5_0255_3b42_a0c4_169f3ed867cc dc0150e4_fa1e_faa8_3643_9c1860fad9ee["release()"] cad266a5_0255_3b42_a0c4_169f3ed867cc -->|calls| dc0150e4_fa1e_faa8_3643_9c1860fad9ee style cad266a5_0255_3b42_a0c4_169f3ed867cc fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/test/java/io/netty/handler/codec/http/HttpResponseEncoderTest.java lines 328–357
private void testEmptyContents(boolean chunked, boolean trailers) throws Exception {
HttpResponseEncoder encoder = new HttpResponseEncoder();
EmbeddedChannel channel = new EmbeddedChannel(encoder);
HttpResponse request = new DefaultHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK);
if (chunked) {
HttpUtil.setTransferEncodingChunked(request, true);
}
assertTrue(channel.writeOutbound(request));
ByteBuf contentBuffer = Unpooled.buffer();
assertTrue(channel.writeOutbound(new DefaultHttpContent(contentBuffer)));
ByteBuf lastContentBuffer = Unpooled.buffer();
LastHttpContent last = new DefaultLastHttpContent(lastContentBuffer);
if (trailers) {
last.trailingHeaders().set("X-Netty-Test", "true");
}
assertTrue(channel.writeOutbound(last));
// Ensure we only produce ByteBuf instances.
ByteBuf head = channel.readOutbound();
assertTrue(head.release());
ByteBuf content = channel.readOutbound();
content.release();
ByteBuf lastContent = channel.readOutbound();
lastContent.release();
assertFalse(channel.finish());
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does testEmptyContents() do?
testEmptyContents() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpResponseEncoderTest.java.
Where is testEmptyContents() defined?
testEmptyContents() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpResponseEncoderTest.java at line 328.
What does testEmptyContents() call?
testEmptyContents() calls 1 function(s): release.
What calls testEmptyContents()?
testEmptyContents() is called by 4 function(s): testEmptyContentNotsChunkedWithTrailers, testEmptyContentsChunked, testEmptyContentsChunkedWithTrailers, testEmptyContentsNotChunked.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free