getContentLength() — netty Function Reference
Architecture documentation for the getContentLength() function in HttpUtil.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 6f9da954_b612_8a2c_b28f_103659ebf676["getContentLength()"] 0b1cc975_2772_c898_b055_3991b4e80dba["HttpUtil"] 6f9da954_b612_8a2c_b28f_103659ebf676 -->|defined in| 0b1cc975_2772_c898_b055_3991b4e80dba 53f80eda_5c94_cd8f_15bf_80479efefe57["getWebSocketContentLength()"] 6f9da954_b612_8a2c_b28f_103659ebf676 -->|calls| 53f80eda_5c94_cd8f_15bf_80479efefe57 style 6f9da954_b612_8a2c_b28f_103659ebf676 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java lines 205–220
public static long getContentLength(HttpMessage message) {
String value = message.headers().get(HttpHeaderNames.CONTENT_LENGTH);
if (value != null) {
return Long.parseLong(value);
}
// We know the content length if it's a Web Socket message even if
// Content-Length header is missing.
long webSocketContentLength = getWebSocketContentLength(message);
if (webSocketContentLength >= 0) {
return webSocketContentLength;
}
// Otherwise we don't.
throw new NumberFormatException("header not found: " + HttpHeaderNames.CONTENT_LENGTH);
}
Domain
Subdomains
Source
Frequently Asked Questions
What does getContentLength() do?
getContentLength() is a function in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java.
Where is getContentLength() defined?
getContentLength() is defined in codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java at line 205.
What does getContentLength() call?
getContentLength() calls 1 function(s): getWebSocketContentLength.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free