com.alexkasko.unsafe.offheapstruct
public interface OffHeapStructAccessor
Modifier and Type | Method and Description |
---|---|
void |
get(byte[] buffer)
Copies struct into specified buffer
|
void |
get(int srcPos,
byte[] dest,
int destPos,
int length)
Copies part of struct into specified buffer
|
byte |
getByte(int offset)
Gets byte from struct with specified offset
|
int |
getInt(int offset)
Gets four bytes as int from struct with specified offset
|
long |
getLong(int offset)
Gets long from struct with specified offset
|
short |
getShort(int offset)
Gets two bytes as short from struct with specified offset
|
short |
getUnsignedByte(int offset)
Gets one byte (stored as one signed byte) from struct on specified index
with specified offset, converts it to unsigned and returns it as short
|
long |
getUnsignedInt(int offset)
Gets unsigned int (stored as 4 bytes) and returns it as long
from struct with specified offset
|
int |
getUnsignedShort(int offset)
Gets unsigned short (stored as two bytes) from struct on specified index
with specified offset and returns it as int
|
int |
structLength()
Returns length of the single struct in bytes
|
int structLength()
void get(byte[] buffer)
buffer
- buffer to copy struct intovoid get(int srcPos, byte[] dest, int destPos, int length)
srcPos
- dest
- destPos
- length
- byte getByte(int offset)
offset
- byte array indexshort getUnsignedByte(int offset)
offset
- byte array indexshort getShort(int offset)
offset
- byte array offsetint getUnsignedShort(int offset)
offset
- byte array offsetint getInt(int offset)
offset
- byte array offsetlong getUnsignedInt(int offset)
offset
- byte array offsetlong getLong(int offset)
offset
- byte array offsetCopyright © 2014. All Rights Reserved.