Home / Function/ isContentType() — netty Function Reference

isContentType() — netty Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

codec-http/src/main/java/io/netty/handler/codec/http/HttpRequestDecoder.java lines 288–305

    private static boolean isContentType(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 int maybeType = sb[start + 8] |
                sb[start + 9] << 8 |
                sb[start + 10] << 16 |
                sb[start + 11] << 24;
        return maybeType == TYPE_AS_INT;
    }

Subdomains

Called By

Frequently Asked Questions

What does isContentType() do?
isContentType() is a function in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/HttpRequestDecoder.java.
Where is isContentType() defined?
isContentType() is defined in codec-http/src/main/java/io/netty/handler/codec/http/HttpRequestDecoder.java at line 288.
What calls isContentType()?
isContentType() 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