Home / Function/ isContentLength() — netty Function Reference

isContentLength() — netty Function Reference

Architecture documentation for the isContentLength() function in HttpRequestDecoder.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  ee084111_b33d_781d_f618_45168de21b0a["isContentLength()"]
  4589186b_4bcc_122c_2013_a0e40fd58a92["HttpRequestDecoder"]
  ee084111_b33d_781d_f618_45168de21b0a -->|defined in| 4589186b_4bcc_122c_2013_a0e40fd58a92
  74fbc3b2_d53f_c201_3682_db8c061ddf60["AsciiString()"]
  74fbc3b2_d53f_c201_3682_db8c061ddf60 -->|calls| ee084111_b33d_781d_f618_45168de21b0a
  style ee084111_b33d_781d_f618_45168de21b0a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/main/java/io/netty/handler/codec/http/HttpRequestDecoder.java lines 307–326

    private static boolean isContentLength(byte[] sb, int start) {
        final long maybeContent = sb[start] |
                sb[start + 1] << 8 |
                sb[start + 2] << 16 |
                sb[start + 3] << 24 |
                (long) sb[start + 4] << 32 |
                (long) sb[start + 5] << 40 |
                (long) sb[start + 6] << 48 |
                (long) sb[start + 7] << 56;
        if (maybeContent != CONTENT_AS_LONG) {
            return false;
        }
        final long maybeLength = sb[start + 8] |
                sb[start + 9] << 8 |
                sb[start + 10] << 16 |
                sb[start + 11] << 24 |
                (long) sb[start + 12] << 32 |
                (long) sb[start + 13] << 40;
        return maybeLength == LENGTH_AS_LONG;
    }

Subdomains

Called By

Frequently Asked Questions

What does isContentLength() do?
isContentLength() is a function in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/HttpRequestDecoder.java.
Where is isContentLength() defined?
isContentLength() is defined in codec-http/src/main/java/io/netty/handler/codec/http/HttpRequestDecoder.java at line 307.
What calls isContentLength()?
isContentLength() is called by 1 function(s): AsciiString.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free