encodeLiteral() — netty Function Reference
Architecture documentation for the encodeLiteral() function in HpackEncoder.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 23158887_3faf_9358_cf8e_ccef0456523f["encodeLiteral()"] 616b4418_6852_a9a9_188d_063a8768b35a["HpackEncoder"] 23158887_3faf_9358_cf8e_ccef0456523f -->|defined in| 616b4418_6852_a9a9_188d_063a8768b35a d416f498_d09b_3bf6_6f3c_bec7a647a54f["encodeHeader()"] d416f498_d09b_3bf6_6f3c_bec7a647a54f -->|calls| 23158887_3faf_9358_cf8e_ccef0456523f 67aada40_9838_0523_a316_eceb773154ab["encodeAndAddEntries()"] 67aada40_9838_0523_a316_eceb773154ab -->|calls| 23158887_3faf_9358_cf8e_ccef0456523f ff646124_1e6a_47c4_ccf7_8d4b7525d870["encodeInteger()"] 23158887_3faf_9358_cf8e_ccef0456523f -->|calls| ff646124_1e6a_47c4_ccf7_8d4b7525d870 772d7221_f578_9e4a_8e58_b93602d19372["encodeStringLiteral()"] 23158887_3faf_9358_cf8e_ccef0456523f -->|calls| 772d7221_f578_9e4a_8e58_b93602d19372 style 23158887_3faf_9358_cf8e_ccef0456523f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/main/java/io/netty/handler/codec/http2/HpackEncoder.java lines 318–338
private void encodeLiteral(ByteBuf out, CharSequence name, CharSequence value, IndexType indexType,
int nameIndex) {
boolean nameIndexValid = nameIndex != NOT_FOUND;
switch (indexType) {
case INCREMENTAL:
encodeInteger(out, 0x40, 6, nameIndexValid ? nameIndex : 0);
break;
case NONE:
encodeInteger(out, 0x00, 4, nameIndexValid ? nameIndex : 0);
break;
case NEVER:
encodeInteger(out, 0x10, 4, nameIndexValid ? nameIndex : 0);
break;
default:
throw new Error("Unexpected index type: " + indexType);
}
if (!nameIndexValid) {
encodeStringLiteral(out, name);
}
encodeStringLiteral(out, value);
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does encodeLiteral() do?
encodeLiteral() is a function in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/HpackEncoder.java.
Where is encodeLiteral() defined?
encodeLiteral() is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/HpackEncoder.java at line 318.
What does encodeLiteral() call?
encodeLiteral() calls 2 function(s): encodeInteger, encodeStringLiteral.
What calls encodeLiteral()?
encodeLiteral() is called by 2 function(s): encodeAndAddEntries, encodeHeader.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free