ByteBuf() — netty Function Reference
Architecture documentation for the ByteBuf() function in Base64.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 74bdbf8f_873e_a2b1_95c7_3ecf25a01412["ByteBuf()"] 28e851bb_9265_53b6_adb0_c9cb3a05d218["Decoder"] 74bdbf8f_873e_a2b1_95c7_3ecf25a01412 -->|defined in| 28e851bb_9265_53b6_adb0_c9cb3a05d218 4f7736d1_ec07_0635_3a59_146a5d9a3f83["decodedBufferSize()"] 74bdbf8f_873e_a2b1_95c7_3ecf25a01412 -->|calls| 4f7736d1_ec07_0635_3a59_146a5d9a3f83 dbcef1d6_0b01_dce3_e545_ec8b64ccb15b["decodabet()"] 74bdbf8f_873e_a2b1_95c7_3ecf25a01412 -->|calls| dbcef1d6_0b01_dce3_e545_ec8b64ccb15b ecb75b44_a34c_e912_2204_cd8b6698abcb["decode4to3()"] 74bdbf8f_873e_a2b1_95c7_3ecf25a01412 -->|calls| ecb75b44_a34c_e912_2204_cd8b6698abcb style 74bdbf8f_873e_a2b1_95c7_3ecf25a01412 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-base/src/main/java/io/netty/handler/codec/base64/Base64.java lines 380–406
ByteBuf decode(ByteBuf src, int off, int len, ByteBufAllocator allocator, Base64Dialect dialect) {
dest = allocator.buffer(decodedBufferSize(len)).order(src.order()); // Upper limit on size of output
decodabet = decodabet(dialect);
try {
src.forEachByte(off, len, this);
// Padding missing, process additional bytes
if (b4Posn == 1) {
throw new IllegalArgumentException(
"Invalid Base64 input, single remaining character implies incorrect length or padding");
} else if (b4Posn == 2) {
b4[2] = EQUALS_SIGN;
b4[3] = EQUALS_SIGN;
outBuffPosn += decode4to3(b4, dest, outBuffPosn, decodabet);
} else if (b4Posn == 3) {
b4[3] = EQUALS_SIGN;
outBuffPosn += decode4to3(b4, dest, outBuffPosn, decodabet);
}
return dest.slice(0, outBuffPosn);
} catch (Throwable cause) {
dest.release();
PlatformDependent.throwException(cause);
return null;
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does ByteBuf() do?
ByteBuf() is a function in the netty codebase, defined in codec-base/src/main/java/io/netty/handler/codec/base64/Base64.java.
Where is ByteBuf() defined?
ByteBuf() is defined in codec-base/src/main/java/io/netty/handler/codec/base64/Base64.java at line 380.
What does ByteBuf() call?
ByteBuf() calls 3 function(s): decodabet, decode4to3, decodedBufferSize.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free