This class may be removed in the future. Consider the replacements in JEP 193 'Variable Handles': http://openjdk.java.net/jeps/193
@Override public long getLongLittleEndian(byte[] array, int offset) { return theUnsafe.getLong(array, (long) offset + BYTE_ARRAY_BASE_OFFSET); }
static long getLong(byte[] data, int index) { return UNSAFE.getLong(data, BYTE_ARRAY_BASE_OFFSET + index); }
private static long getLong(Object object, long fieldOffset) { return UNSAFE.getLong(object, fieldOffset); }
static long getLong(long address) { return UNSAFE.getLong(address); }
@Override public long getLongLittleEndian(byte[] array, int offset) { long bigEndian = theUnsafe.getLong(array, (long) offset + BYTE_ARRAY_BASE_OFFSET); // The hardware is big-endian, so we need to reverse the order of the bytes. return Long.reverseBytes(bigEndian); }
long getLongUnchecked(int index) { return unsafe.getLong(base, address + index); }
@Override public long getLongLittleEndian(byte[] array, int offset) { return theUnsafe.getLong(array, (long) offset + BYTE_ARRAY_BASE_OFFSET); }
@Override public long getLong(long byteIndex) { return unsafe.getLong(baseAdress + byteIndex); }
/** * Read the value of the address field in the (assumed to be) DirectByteBuffer. * <p> * <strong>NOTE:</strong> calling this method on a non-direct ByteBuffer is undefined behaviour. * * @param dbb The direct byte buffer to read the address field from. * @return The native memory address in the given direct byte buffer. */ public static long getDirectByteBufferAddress( ByteBuffer dbb ) { return unsafe.getLong( dbb, directByteBufferAddressOffset ); }
public final long getLongValueUnsafe(Object obj) throws IllegalAccessException { return FSTUtil.unFlaggedUnsafe.getLong(obj, memOffset); }
private static long getLong(Object object, long fieldOffset) { return UNSAFE.getLong(object, fieldOffset); }
static long getLong(byte[] data, int index) { return UNSAFE.getLong(data, BYTE_ARRAY_BASE_OFFSET + index); }
@Override public long getLongLittleEndian(byte[] array, int offset) { long bigEndian = theUnsafe.getLong(array, (long) offset + BYTE_ARRAY_BASE_OFFSET); // The hardware is big-endian, so we need to reverse the order of the bytes. return Long.reverseBytes(bigEndian); }
public final long getLongValue(Object obj) throws IllegalAccessException { if (!isAndroid && memOffset >= 0) { return FSTUtil.unFlaggedUnsafe.getLong(obj, memOffset); } return field.getLong(obj); }
public static long getLong(byte[] bytes, int index) { checkIndexLength(bytes.length, index, SIZE_OF_LONG); return unsafe.getLong(bytes, ((long) ARRAY_BYTE_BASE_OFFSET) + index); }
@Override public long getLong(long byteIndex) { checkIndex(byteIndex,8); return unsafe.getLong(base, off + byteIndex); }
public static long getAddress(ByteBuffer buf) { return UNSAFE.getLong(buf, ADDRESS_OFFSET); }
public static long getLong( long address ) { checkAccess( address, Long.BYTES ); return unsafe.getLong( address ); }
private static long getRawLong(Slice decimal, int index) { return unsafe.getLong(decimal.getBase(), decimal.getAddress() + SIZE_OF_LONG * index); }
private static long getRawLong(Slice decimal, int index) { return unsafe.getLong(decimal.getBase(), decimal.getAddress() + SIZE_OF_LONG * index); }