Modifier and Type | Field and Description |
---|---|
static long |
BYTE_ARRAY_BASE_OFFSET |
static boolean |
LITTLE_ENDIAN |
static sun.misc.Unsafe |
UNSAFE |
Modifier and Type | Method and Description |
---|---|
static MemorySegment |
allocateHeapMemory(int size) |
static MemorySegment |
allocateOffHeapMemory(int size) |
int |
compare(MemorySegment seg2,
int offset1,
int offset2,
int len) |
int |
compare(MemorySegment seg2,
int offset1,
int offset2,
int len1,
int len2) |
void |
copyFromUnsafe(int offset,
Object source,
int sourcePointer,
int numBytes) |
void |
copyTo(int offset,
MemorySegment target,
int targetOffset,
int numBytes) |
void |
copyToUnsafe(int offset,
Object target,
int targetPointer,
int numBytes) |
boolean |
equalTo(MemorySegment seg2,
int offset1,
int offset2,
int length)
Equals two memory segment regions.
|
void |
get(DataOutput out,
int offset,
int length) |
byte |
get(int index) |
void |
get(int index,
byte[] dst) |
void |
get(int index,
byte[] dst,
int offset,
int length) |
void |
get(int offset,
ByteBuffer target,
int numBytes) |
byte[] |
getArray() |
boolean |
getBoolean(int index) |
char |
getChar(int index) |
char |
getCharBigEndian(int index) |
char |
getCharLittleEndian(int index) |
double |
getDouble(int index) |
double |
getDoubleBigEndian(int index) |
double |
getDoubleLittleEndian(int index) |
float |
getFloat(int index) |
float |
getFloatBigEndian(int index) |
float |
getFloatLittleEndian(int index) |
byte[] |
getHeapMemory()
Get the heap byte array object.
|
int |
getInt(int index) |
int |
getIntBigEndian(int index) |
int |
getIntLittleEndian(int index) |
long |
getLong(int index) |
long |
getLongBigEndian(int index) |
long |
getLongLittleEndian(int index) |
short |
getShort(int index) |
short |
getShortBigEndian(int index) |
short |
getShortLittleEndian(int index) |
boolean |
isOffHeap() |
void |
put(DataInput in,
int offset,
int length) |
void |
put(int index,
byte b) |
void |
put(int index,
byte[] src) |
void |
put(int index,
byte[] src,
int offset,
int length) |
void |
put(int offset,
ByteBuffer source,
int numBytes) |
void |
putBoolean(int index,
boolean value) |
void |
putChar(int index,
char value) |
void |
putCharBigEndian(int index,
char value) |
void |
putCharLittleEndian(int index,
char value) |
void |
putDouble(int index,
double value) |
void |
putDoubleBigEndian(int index,
double value) |
void |
putDoubleLittleEndian(int index,
double value) |
void |
putFloat(int index,
float value) |
void |
putFloatBigEndian(int index,
float value) |
void |
putFloatLittleEndian(int index,
float value) |
void |
putInt(int index,
int value) |
void |
putIntBigEndian(int index,
int value) |
void |
putIntLittleEndian(int index,
int value) |
void |
putLong(int index,
long value) |
void |
putLongBigEndian(int index,
long value) |
void |
putLongLittleEndian(int index,
long value) |
void |
putShort(int index,
short value) |
void |
putShortBigEndian(int index,
short value) |
void |
putShortLittleEndian(int index,
short value) |
int |
size() |
void |
swapBytes(byte[] tempBuffer,
MemorySegment seg2,
int offset1,
int offset2,
int len) |
static MemorySegment |
wrap(byte[] buffer) |
ByteBuffer |
wrap(int offset,
int length) |
static MemorySegment |
wrapOffHeapMemory(ByteBuffer buffer) |
public static final sun.misc.Unsafe UNSAFE
public static final long BYTE_ARRAY_BASE_OFFSET
public static final boolean LITTLE_ENDIAN
public static MemorySegment wrap(byte[] buffer)
public static MemorySegment wrapOffHeapMemory(ByteBuffer buffer)
public static MemorySegment allocateHeapMemory(int size)
public static MemorySegment allocateOffHeapMemory(int size)
public int size()
public boolean isOffHeap()
public byte[] getArray()
public ByteBuffer wrap(int offset, int length)
public byte get(int index)
public void put(int index, byte b)
public void get(int index, byte[] dst)
public void put(int index, byte[] src)
public void get(int index, byte[] dst, int offset, int length)
public void put(int index, byte[] src, int offset, int length)
public boolean getBoolean(int index)
public void putBoolean(int index, boolean value)
public char getChar(int index)
public char getCharLittleEndian(int index)
public char getCharBigEndian(int index)
public void putChar(int index, char value)
public void putCharLittleEndian(int index, char value)
public void putCharBigEndian(int index, char value)
public short getShort(int index)
public short getShortLittleEndian(int index)
public short getShortBigEndian(int index)
public void putShort(int index, short value)
public void putShortLittleEndian(int index, short value)
public void putShortBigEndian(int index, short value)
public int getInt(int index)
public int getIntLittleEndian(int index)
public int getIntBigEndian(int index)
public void putInt(int index, int value)
public void putIntLittleEndian(int index, int value)
public void putIntBigEndian(int index, int value)
public long getLong(int index)
public long getLongLittleEndian(int index)
public long getLongBigEndian(int index)
public void putLong(int index, long value)
public void putLongLittleEndian(int index, long value)
public void putLongBigEndian(int index, long value)
public float getFloat(int index)
public float getFloatLittleEndian(int index)
public float getFloatBigEndian(int index)
public void putFloat(int index, float value)
public void putFloatLittleEndian(int index, float value)
public void putFloatBigEndian(int index, float value)
public double getDouble(int index)
public double getDoubleLittleEndian(int index)
public double getDoubleBigEndian(int index)
public void putDouble(int index, double value)
public void putDoubleLittleEndian(int index, double value)
public void putDoubleBigEndian(int index, double value)
public void get(DataOutput out, int offset, int length) throws IOException
IOException
public void put(DataInput in, int offset, int length) throws IOException
IOException
public void get(int offset, ByteBuffer target, int numBytes)
public void put(int offset, ByteBuffer source, int numBytes)
public void copyTo(int offset, MemorySegment target, int targetOffset, int numBytes)
public void copyToUnsafe(int offset, Object target, int targetPointer, int numBytes)
public void copyFromUnsafe(int offset, Object source, int sourcePointer, int numBytes)
public int compare(MemorySegment seg2, int offset1, int offset2, int len)
public int compare(MemorySegment seg2, int offset1, int offset2, int len1, int len2)
public void swapBytes(byte[] tempBuffer, MemorySegment seg2, int offset1, int offset2, int len)
public boolean equalTo(MemorySegment seg2, int offset1, int offset2, int length)
seg2
- Segment to equal this segment withoffset1
- Offset of this segment to start equalingoffset2
- Offset of seg2 to start equalinglength
- Length of the equaled memory regionpublic byte[] getHeapMemory()
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.