shortToBytes() — netty Function Reference
Architecture documentation for the shortToBytes() function in RedisCodecUtil.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 58da057e_c360_6ea1_6541_9a20042c6b2b["shortToBytes()"] 12e7c65d_46c6_d84b_951d_c38480417075["RedisCodecUtil"] 58da057e_c360_6ea1_6541_9a20042c6b2b -->|defined in| 12e7c65d_46c6_d84b_951d_c38480417075 style 58da057e_c360_6ea1_6541_9a20042c6b2b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-redis/src/main/java/io/netty/handler/codec/redis/RedisCodecUtil.java lines 44–54
static byte[] shortToBytes(short value) {
byte[] bytes = new byte[2];
if (PlatformDependent.BIG_ENDIAN_NATIVE_ORDER) {
bytes[1] = (byte) ((value >> 8) & 0xff);
bytes[0] = (byte) (value & 0xff);
} else {
bytes[0] = (byte) ((value >> 8) & 0xff);
bytes[1] = (byte) (value & 0xff);
}
return bytes;
}
Domain
Subdomains
Source
Frequently Asked Questions
What does shortToBytes() do?
shortToBytes() is a function in the netty codebase, defined in codec-redis/src/main/java/io/netty/handler/codec/redis/RedisCodecUtil.java.
Where is shortToBytes() defined?
shortToBytes() is defined in codec-redis/src/main/java/io/netty/handler/codec/redis/RedisCodecUtil.java at line 44.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free