Home / Function/ getLongSafe() — netty Function Reference

getLongSafe() — netty Function Reference

Architecture documentation for the getLongSafe() function in PlatformDependent.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  5140069a_ce25_e10a_f6aa_156c805ce627["getLongSafe()"]
  2e66d079_807f_6785_864f_73ab09fbc515["PlatformDependent"]
  5140069a_ce25_e10a_f6aa_156c805ce627 -->|defined in| 2e66d079_807f_6785_864f_73ab09fbc515
  91a08e9d_6796_2685_69c3_75e596cc8ed2["hashCodeAsciiSafe()"]
  91a08e9d_6796_2685_69c3_75e596cc8ed2 -->|calls| 5140069a_ce25_e10a_f6aa_156c805ce627
  style 5140069a_ce25_e10a_f6aa_156c805ce627 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/main/java/io/netty/util/internal/PlatformDependent.java lines 799–818

    private static long getLongSafe(byte[] bytes, int offset) {
        if (BIG_ENDIAN_NATIVE_ORDER) {
            return (long) bytes[offset] << 56 |
                    ((long) bytes[offset + 1] & 0xff) << 48 |
                    ((long) bytes[offset + 2] & 0xff) << 40 |
                    ((long) bytes[offset + 3] & 0xff) << 32 |
                    ((long) bytes[offset + 4] & 0xff) << 24 |
                    ((long) bytes[offset + 5] & 0xff) << 16 |
                    ((long) bytes[offset + 6] & 0xff) <<  8 |
                    (long) bytes[offset + 7] & 0xff;
        }
        return (long) bytes[offset] & 0xff |
                ((long) bytes[offset + 1] & 0xff) << 8 |
                ((long) bytes[offset + 2] & 0xff) << 16 |
                ((long) bytes[offset + 3] & 0xff) << 24 |
                ((long) bytes[offset + 4] & 0xff) << 32 |
                ((long) bytes[offset + 5] & 0xff) << 40 |
                ((long) bytes[offset + 6] & 0xff) << 48 |
                (long) bytes[offset + 7] << 56;
    }

Domain

Subdomains

Frequently Asked Questions

What does getLongSafe() do?
getLongSafe() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/internal/PlatformDependent.java.
Where is getLongSafe() defined?
getLongSafe() is defined in common/src/main/java/io/netty/util/internal/PlatformDependent.java at line 799.
What calls getLongSafe()?
getLongSafe() is called by 1 function(s): hashCodeAsciiSafe.

Analyze Your Own Codebase

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

Try Supermodel Free