Home / Function/ body() — netty Function Reference

body() — netty Function Reference

Architecture documentation for the body() function in Html.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  32d6074c_6a40_124d_e04e_0285b04cd357["body()"]
  fe30ffab_b76d_a88a_5dd4_2e3223b0bfc5["Html"]
  32d6074c_6a40_124d_e04e_0285b04cd357 -->|defined in| fe30ffab_b76d_a88a_5dd4_2e3223b0bfc5
  701c6fc1_0f4f_1076_7d61_d2f4775d15d8["stringLength()"]
  32d6074c_6a40_124d_e04e_0285b04cd357 -->|calls| 701c6fc1_0f4f_1076_7d61_d2f4775d15d8
  style 32d6074c_6a40_124d_e04e_0285b04cd357 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

example/src/main/java/io/netty/example/http2/tiles/Html.java lines 56–74

    public static byte[] body(int latency) {
        int r = Math.abs(new Random().nextInt());
        // The string to be built contains 13192 fixed characters plus the variable latency and random cache-bust.
        int numberOfCharacters = 13192 + stringLength(latency) + stringLength(r);
        StringBuilder sb = new StringBuilder(numberOfCharacters).append("<div id=\"netty\">");
        for (int y = 0; y < IMAGES_Y_AXIS; y++) {
            for (int x = 0; x < IMAGES_X_AXIS; x++) {
                sb.append("<img width=30 height=29 src='/http2?x=")
                .append(x)
                .append("&y=").append(y)
                .append("&cachebust=").append(r)
                .append("&latency=").append(latency)
                .append("'>");
            }
            sb.append("<br/>\r\n");
        }
        sb.append("</div>");
        return sb.toString().getBytes(UTF_8);
    }

Domain

Subdomains

Frequently Asked Questions

What does body() do?
body() is a function in the netty codebase, defined in example/src/main/java/io/netty/example/http2/tiles/Html.java.
Where is body() defined?
body() is defined in example/src/main/java/io/netty/example/http2/tiles/Html.java at line 56.
What does body() call?
body() calls 1 function(s): stringLength.

Analyze Your Own Codebase

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

Try Supermodel Free