Home / Function/ appendResponseHeader() — netty Function Reference

appendResponseHeader() — netty Function Reference

Architecture documentation for the appendResponseHeader() function in DnsMessageUtil.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  b72bda91_399b_0def_b1b3_6121ee1f8fd1["appendResponseHeader()"]
  712b890c_041c_4773_effc_f02cf18d95ab["DnsMessageUtil"]
  b72bda91_399b_0def_b1b3_6121ee1f8fd1 -->|defined in| 712b890c_041c_4773_effc_f02cf18d95ab
  5eb63f58_19af_5714_2a8e_9451f6a3698f["StringBuilder()"]
  5eb63f58_19af_5714_2a8e_9451f6a3698f -->|calls| b72bda91_399b_0def_b1b3_6121ee1f8fd1
  style b72bda91_399b_0def_b1b3_6121ee1f8fd1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-dns/src/main/java/io/netty/handler/codec/dns/DnsMessageUtil.java lines 97–140

    private static void appendResponseHeader(StringBuilder buf, DnsResponse msg) {
        buf.append(StringUtil.simpleClassName(msg))
           .append('(');

        appendAddresses(buf, msg)
           .append("id: ")
           .append(msg.id())
           .append(", ")
           .append(msg.opCode())
           .append(", ")
           .append(msg.code())
           .append(',');

        boolean hasComma = true;
        if (msg.isRecursionDesired()) {
            hasComma = false;
            buf.append(" RD");
        }
        if (msg.isAuthoritativeAnswer()) {
            hasComma = false;
            buf.append(" AA");
        }
        if (msg.isTruncated()) {
            hasComma = false;
            buf.append(" TC");
        }
        if (msg.isRecursionAvailable()) {
            hasComma = false;
            buf.append(" RA");
        }
        if (msg.z() != 0) {
            if (!hasComma) {
                buf.append(',');
            }
            buf.append(" Z: ")
               .append(msg.z());
        }

        if (hasComma) {
            buf.setCharAt(buf.length() - 1, ')');
        } else {
            buf.append(')');
        }
    }

Subdomains

Called By

Frequently Asked Questions

What does appendResponseHeader() do?
appendResponseHeader() is a function in the netty codebase, defined in codec-dns/src/main/java/io/netty/handler/codec/dns/DnsMessageUtil.java.
Where is appendResponseHeader() defined?
appendResponseHeader() is defined in codec-dns/src/main/java/io/netty/handler/codec/dns/DnsMessageUtil.java at line 97.
What calls appendResponseHeader()?
appendResponseHeader() is called by 1 function(s): StringBuilder.

Analyze Your Own Codebase

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

Try Supermodel Free