List of usage examples for io.netty.util.internal PlatformDependent putInt
public static void putInt(byte[] data, int index, int value)
From source file:herddb.utils.Bytes.java
License:Apache License
public static void putInt(byte[] array, int index, int value) { if (HAS_UNSAFE && UNALIGNED) { PlatformDependent.putInt(array, index, BIG_ENDIAN_NATIVE_ORDER ? value : Integer.reverseBytes(value)); } else {/* ww w .j av a 2 s . co m*/ array[index] = (byte) (value >>> 24); array[index + 1] = (byte) (value >>> 16); array[index + 2] = (byte) (value >>> 8); array[index + 3] = (byte) value; } }