private long basicGetLong(final int pos) {
      long addr = chunk.getAddressForReadingData(pos, 8);
      if (unaligned) {
        long result = AddressableMemoryManager.readLong(addr);
        if (ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN) {
          result = Long.reverseBytes(result);
        }
        return result;
      } else {
        byte b0 = AddressableMemoryManager.readByte(addr++);
        byte b1 = AddressableMemoryManager.readByte(addr++);
        byte b2 = AddressableMemoryManager.readByte(addr++);
        byte b3 = AddressableMemoryManager.readByte(addr++);
        byte b4 = AddressableMemoryManager.readByte(addr++);
        byte b5 = AddressableMemoryManager.readByte(addr++);
        byte b6 = AddressableMemoryManager.readByte(addr++);
        byte b7 = AddressableMemoryManager.readByte(addr);
        return (((long) b0 << 56) + ((long) (b1 & 255) << 48) + ((long) (b2 & 255) << 40)
            + ((long) (b3 & 255) << 32) + ((long) (b4 & 255) << 24) + ((b5 & 255) << 16)
            + ((b6 & 255) << 8) + ((b7 & 255) << 0));
      }
    }
Return true if the hardware supports unaligned reads from memory.
geode-core/src/main/java/org/apache/geode/internal/tcp/ByteBufferInputStream.java