Home / Function/ decode() — netty Function Reference

decode() — netty Function Reference

Architecture documentation for the decode() function in SpdyHeaderBlockRawDecoder.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  29a55946_3e46_6039_dd0f_cef33fd9b15d["decode()"]
  77ffda47_df0d_5f3f_1a09_80e71de6135b["SpdyHeaderBlockRawDecoder"]
  29a55946_3e46_6039_dd0f_cef33fd9b15d -->|defined in| 77ffda47_df0d_5f3f_1a09_80e71de6135b
  ba703864_8c4c_a402_0ea4_c1e98dc38154["decodeHeaderBlock()"]
  29a55946_3e46_6039_dd0f_cef33fd9b15d -->|calls| ba703864_8c4c_a402_0ea4_c1e98dc38154
  611e648f_06b9_6900_5c16_b5fdcac2a6a1["releaseBuffer()"]
  29a55946_3e46_6039_dd0f_cef33fd9b15d -->|calls| 611e648f_06b9_6900_5c16_b5fdcac2a6a1
  style 29a55946_3e46_6039_dd0f_cef33fd9b15d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/main/java/io/netty/handler/codec/spdy/SpdyHeaderBlockRawDecoder.java lines 65–85

    @Override
    void decode(ByteBufAllocator alloc, ByteBuf headerBlock, SpdyHeadersFrame frame) throws Exception {
        ObjectUtil.checkNotNull(headerBlock, "headerBlock");
        ObjectUtil.checkNotNull(frame, "frame");

        if (cumulation == null) {
            decodeHeaderBlock(headerBlock, frame);
            if (headerBlock.isReadable()) {
                cumulation = alloc.buffer(headerBlock.readableBytes());
                cumulation.writeBytes(headerBlock);
            }
        } else {
            cumulation.writeBytes(headerBlock);
            decodeHeaderBlock(cumulation, frame);
            if (cumulation.isReadable()) {
                cumulation.discardReadBytes();
            } else {
                releaseBuffer();
            }
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does decode() do?
decode() is a function in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/spdy/SpdyHeaderBlockRawDecoder.java.
Where is decode() defined?
decode() is defined in codec-http/src/main/java/io/netty/handler/codec/spdy/SpdyHeaderBlockRawDecoder.java at line 65.
What does decode() call?
decode() calls 2 function(s): decodeHeaderBlock, releaseBuffer.

Analyze Your Own Codebase

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

Try Supermodel Free