Home / Function/ calculateContentLength() — netty Function Reference

calculateContentLength() — netty Function Reference

Architecture documentation for the calculateContentLength() function in HttpContentDecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  2b987b60_3929_ae39_9df4_c066360347d1["calculateContentLength()"]
  ea4ec426_b689_ab52_a554_7959aed6c709["HttpContentDecoderTest"]
  2b987b60_3929_ae39_9df4_c066360347d1 -->|defined in| ea4ec426_b689_ab52_a554_7959aed6c709
  e0f9ca74_1f15_9dd0_32d3_4493874f9cdd["testFullHttpRequest()"]
  e0f9ca74_1f15_9dd0_32d3_4493874f9cdd -->|calls| 2b987b60_3929_ae39_9df4_c066360347d1
  f74ab4f7_ab14_7d61_3fc4_3ae023957285["testFullHttpResponse()"]
  f74ab4f7_ab14_7d61_3fc4_3ae023957285 -->|calls| 2b987b60_3929_ae39_9df4_c066360347d1
  48bb0a82_bab0_ddd2_1e20_706f61bda764["testFullHttpResponseEOF()"]
  48bb0a82_bab0_ddd2_1e20_706f61bda764 -->|calls| 2b987b60_3929_ae39_9df4_c066360347d1
  style 2b987b60_3929_ae39_9df4_c066360347d1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/HttpContentDecoderTest.java lines 868–877

    private static int calculateContentLength(Queue<Object> req, int contentLength) {
        for (Object o : req) {
            if (o instanceof HttpContent) {
                assertTrue(((HttpContent) o).refCnt() > 0);
                ByteBuf b = ((HttpContent) o).content();
                contentLength += b.readableBytes();
            }
        }
        return contentLength;
    }

Domain

Subdomains

Frequently Asked Questions

What does calculateContentLength() do?
calculateContentLength() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentDecoderTest.java.
Where is calculateContentLength() defined?
calculateContentLength() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentDecoderTest.java at line 868.
What calls calculateContentLength()?
calculateContentLength() is called by 3 function(s): testFullHttpRequest, testFullHttpResponse, testFullHttpResponseEOF.

Analyze Your Own Codebase

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

Try Supermodel Free