decodeRandomHexBytes() — netty Function Reference
Architecture documentation for the decodeRandomHexBytes() function in ByteBufUtilTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 8ff54b77_cabc_1f9d_9c67_92a649bd9c12["decodeRandomHexBytes()"] 1b32157c_4c5c_4c3c_706b_1a74a9afdca7["ByteBufUtilTest"] 8ff54b77_cabc_1f9d_9c67_92a649bd9c12 -->|defined in| 1b32157c_4c5c_4c3c_706b_1a74a9afdca7 bf0881bf_db00_b12d_a8d2_196d9d2b2ba5["decodeRandomHexBytesWithEvenLength()"] bf0881bf_db00_b12d_a8d2_196d9d2b2ba5 -->|calls| 8ff54b77_cabc_1f9d_9c67_92a649bd9c12 ec42792f_25fc_0c93_6b44_594bd120bd6c["decodeRandomHexBytesWithOddLength()"] ec42792f_25fc_0c93_6b44_594bd120bd6c -->|calls| 8ff54b77_cabc_1f9d_9c67_92a649bd9c12 style 8ff54b77_cabc_1f9d_9c67_92a649bd9c12 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
buffer/src/test/java/io/netty/buffer/ByteBufUtilTest.java lines 115–125
private static void decodeRandomHexBytes(int len) {
byte[] b = new byte[len];
Random rand = new Random();
rand.nextBytes(b);
String hexDump = ByteBufUtil.hexDump(b);
for (int i = 0; i <= len; i++) { // going over sub-strings of various lengths including empty byte[].
byte[] b2 = Arrays.copyOfRange(b, i, b.length);
byte[] decodedBytes = ByteBufUtil.decodeHexDump(hexDump, i * 2, (len - i) * 2);
assertArrayEquals(b2, decodedBytes);
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does decodeRandomHexBytes() do?
decodeRandomHexBytes() is a function in the netty codebase, defined in buffer/src/test/java/io/netty/buffer/ByteBufUtilTest.java.
Where is decodeRandomHexBytes() defined?
decodeRandomHexBytes() is defined in buffer/src/test/java/io/netty/buffer/ByteBufUtilTest.java at line 115.
What calls decodeRandomHexBytes()?
decodeRandomHexBytes() is called by 2 function(s): decodeRandomHexBytesWithEvenLength, decodeRandomHexBytesWithOddLength.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free