readHttpDataChunkByChunk() — netty Function Reference
Architecture documentation for the readHttpDataChunkByChunk() function in HttpUploadServerHandler.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d050c74a_76ad_11ea_4f73_932ffdd57807["readHttpDataChunkByChunk()"] 15610e19_8d3a_d230_9604_65cc0397e9e9["HttpUploadServerHandler"] d050c74a_76ad_11ea_4f73_932ffdd57807 -->|defined in| 15610e19_8d3a_d230_9604_65cc0397e9e9 98681448_b82b_1b97_25a8_c44670111876["channelRead0()"] 98681448_b82b_1b97_25a8_c44670111876 -->|calls| d050c74a_76ad_11ea_4f73_932ffdd57807 95539507_6c78_9bf4_0be2_a7f34f92df2c["writeHttpData()"] d050c74a_76ad_11ea_4f73_932ffdd57807 -->|calls| 95539507_6c78_9bf4_0be2_a7f34f92df2c style d050c74a_76ad_11ea_4f73_932ffdd57807 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
example/src/main/java/io/netty/example/http/upload/HttpUploadServerHandler.java lines 212–254
private void readHttpDataChunkByChunk() {
try {
while (decoder.hasNext()) {
InterfaceHttpData data = decoder.next();
if (data != null) {
// check if current HttpData is a FileUpload and previously set as partial
if (partialContent == data) {
logger.info(" 100% (FinalSize: " + partialContent.length() + ")");
partialContent = null;
}
// new value
writeHttpData(data);
}
}
// Check partial decoding for a FileUpload
InterfaceHttpData data = decoder.currentPartialHttpData();
if (data != null) {
StringBuilder builder = new StringBuilder();
if (partialContent == null) {
partialContent = (HttpData) data;
if (partialContent instanceof FileUpload) {
builder.append("Start FileUpload: ")
.append(((FileUpload) partialContent).getFilename()).append(" ");
} else {
builder.append("Start Attribute: ")
.append(partialContent.getName()).append(" ");
}
builder.append("(DefinedSize: ").append(partialContent.definedLength()).append(")");
}
if (partialContent.definedLength() > 0) {
builder.append(" ").append(partialContent.length() * 100 / partialContent.definedLength())
.append("% ");
logger.info(builder.toString());
} else {
builder.append(" ").append(partialContent.length()).append(" ");
logger.info(builder.toString());
}
}
} catch (EndOfDataDecoderException e1) {
// end
responseContent.append("\r\n\r\nEND OF CONTENT CHUNK BY CHUNK\r\n\r\n");
}
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does readHttpDataChunkByChunk() do?
readHttpDataChunkByChunk() is a function in the netty codebase, defined in example/src/main/java/io/netty/example/http/upload/HttpUploadServerHandler.java.
Where is readHttpDataChunkByChunk() defined?
readHttpDataChunkByChunk() is defined in example/src/main/java/io/netty/example/http/upload/HttpUploadServerHandler.java at line 212.
What does readHttpDataChunkByChunk() call?
readHttpDataChunkByChunk() calls 1 function(s): writeHttpData.
What calls readHttpDataChunkByChunk()?
readHttpDataChunkByChunk() is called by 1 function(s): channelRead0.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free