channelRead0() — netty Function Reference
Architecture documentation for the channelRead0() function in HttpUploadClientHandler.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 04bbefde_29f0_e956_9653_f281646ba84c["channelRead0()"] e4fa85df_a638_b076_44db_9526fb6537c5["HttpUploadClientHandler"] 04bbefde_29f0_e956_9653_f281646ba84c -->|defined in| e4fa85df_a638_b076_44db_9526fb6537c5 style 04bbefde_29f0_e956_9653_f281646ba84c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
example/src/main/java/io/netty/example/http/upload/HttpUploadClientHandler.java lines 34–72
@Override
public void channelRead0(ChannelHandlerContext ctx, HttpObject msg) {
if (msg instanceof HttpResponse) {
HttpResponse response = (HttpResponse) msg;
System.err.println("STATUS: " + response.status());
System.err.println("VERSION: " + response.protocolVersion());
if (!response.headers().isEmpty()) {
for (CharSequence name : response.headers().names()) {
for (CharSequence value : response.headers().getAll(name)) {
System.err.println("HEADER: " + name + " = " + value);
}
}
}
if (response.status().code() == 200 && HttpUtil.isTransferEncodingChunked(response)) {
readingChunks = true;
System.err.println("CHUNKED CONTENT {");
} else {
System.err.println("CONTENT {");
}
}
if (msg instanceof HttpContent) {
HttpContent chunk = (HttpContent) msg;
System.err.println(chunk.content().toString(CharsetUtil.UTF_8));
if (chunk instanceof LastHttpContent) {
if (readingChunks) {
System.err.println("} END OF CHUNKED CONTENT");
} else {
System.err.println("} END OF CONTENT");
}
readingChunks = false;
} else {
System.err.println(chunk.content().toString(CharsetUtil.UTF_8));
}
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does channelRead0() do?
channelRead0() is a function in the netty codebase, defined in example/src/main/java/io/netty/example/http/upload/HttpUploadClientHandler.java.
Where is channelRead0() defined?
channelRead0() is defined in example/src/main/java/io/netty/example/http/upload/HttpUploadClientHandler.java at line 34.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free