Package org.iq80.snappy
Class UnsafeMemory
- java.lang.Object
-
- org.iq80.snappy.UnsafeMemory
-
-
Field Summary
Fields Modifier and Type Field Description private static long
BYTE_ARRAY_OFFSET
private static long
SHORT_ARRAY_OFFSET
private static long
SHORT_ARRAY_STRIDE
private static sun.misc.Unsafe
unsafe
-
Constructor Summary
Constructors Constructor Description UnsafeMemory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
copyLong(byte[] src, int srcIndex, byte[] dest, int destIndex)
void
copyMemory(byte[] input, int inputIndex, byte[] output, int outputIndex, int length)
boolean
fastAccessSupported()
int
loadByte(byte[] data, int index)
int
loadInt(byte[] data, int index)
long
loadLong(byte[] data, int index)
int
lookupShort(short[] data, int index)
-
-
-
Method Detail
-
fastAccessSupported
public boolean fastAccessSupported()
- Specified by:
fastAccessSupported
in interfaceMemory
-
lookupShort
public int lookupShort(short[] data, int index)
- Specified by:
lookupShort
in interfaceMemory
-
copyLong
public void copyLong(byte[] src, int srcIndex, byte[] dest, int destIndex)
-
copyMemory
public void copyMemory(byte[] input, int inputIndex, byte[] output, int outputIndex, int length)
- Specified by:
copyMemory
in interfaceMemory
-
-