private int basicGetInt(final int pos) {
      long addr = chunk.getAddressForReadingData(pos, 4);
      if (unaligned) {
        int result = AddressableMemoryManager.readInt(addr);
        if (ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN) {
          result = Integer.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);
        return (b0 << 24) + ((b1 & 255) << 16) + ((b2 & 255) << 8) + ((b3 & 255) << 0);
      }
    }
Return true if the hardware supports unaligned reads from memory.
geode-core/src/main/java/org/apache/geode/internal/tcp/ByteBufferInputStream.java