com.alexkasko.unsafe.offheapstruct
public interface OffHeapStructCollection extends OffHeapDisposableIterable<byte[]>
Modifier and Type | Method and Description |
---|---|
void |
get(long index,
byte[] buffer)
Copies struct on specified index into specified buffer
|
void |
get(long index,
int srcPos,
byte[] dest,
int destPos,
int length)
Copies struct part on specified index into specified buffer
|
byte |
getByte(long index,
int offset)
Gets byte from struct on specified index with specified offset
|
int |
getInt(long index,
int offset)
Gets four bytes as int from struct on specified index with specified offset
|
long |
getLong(long index,
int offset)
Gets long from struct on specified index with specified offset
|
short |
getShort(long index,
int offset)
Gets two bytes as short from struct on specified index with specified offset
|
short |
getUnsignedByte(long index,
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(long index,
int offset)
Gets unsigned int (stored as 4 bytes) and returns it as long
from struct on specified index with specified offset
|
int |
getUnsignedShort(long index,
int offset)
Gets unsigned short (stored as two bytes) from struct on specified index
with specified offset and returns it as int
|
void |
putByte(long index,
int offset,
byte value)
Puts byte into struct onto specified index with specified offset
|
void |
putInt(long index,
int offset,
int value)
Puts int into struct onto specified index with specified offset as four bytes
|
void |
putLong(long index,
int offset,
long value)
Puts long into struct onto specified index with specified offset as eight bytes
|
void |
putShort(long index,
int offset,
short value)
Puts short into struct onto specified index with specified offset as two bytes
|
void |
putUnsignedByte(long index,
int offset,
short value)
Puts short with value from 0 to 255 inclusive into struct onto specified
index with specified offset as one signed byte
|
void |
putUnsignedInt(long index,
int offset,
long value)
Puts long value from 0 to 4294967295 inclusive into struct onto specified index
with specified offset as four bytes
|
void |
putUnsignedShort(long index,
int offset,
int value)
Puts int with value from 0 to 65535 inclusive into struct onto specified
index with specified offset as two bytes
|
void |
set(long index,
byte[] struct)
Copies specified struct contents onto specified index
|
long |
size()
Returns number of elements in this array
|
int |
structLength()
Returns length of the single struct in bytes
|
iterator
free
int structLength()
long size()
void get(long index, byte[] buffer)
index
- array indexbuffer
- buffer to copy struct intovoid get(long index, int srcPos, byte[] dest, int destPos, int length)
index
- array indexsrcPos
- struct position in collectiondest
- buffer to copy struct intodestPos
- position in bufferlength
- number of bytes to copyvoid set(long index, byte[] struct)
index
- array indexstruct
- struct to copy into arraybyte getByte(long index, int offset)
index
- array indexoffset
- byte array indexvoid putByte(long index, int offset, byte value)
index
- array indexoffset
- byte array indexvalue
- valueshort getUnsignedByte(long index, int offset)
index
- array indexoffset
- byte array indexvoid putUnsignedByte(long index, int offset, short value)
index
- array indexoffset
- byte array indexvalue
- unsigned byteshort getShort(long index, int offset)
index
- array indexoffset
- byte array offsetvoid putShort(long index, int offset, short value)
index
- array indexoffset
- byte array offsetvalue
- short valueint getUnsignedShort(long index, int offset)
index
- array indexoffset
- byte array offsetvoid putUnsignedShort(long index, int offset, int value)
index
- array indexoffset
- byte array offsetvalue
- unsigned short as intint getInt(long index, int offset)
index
- array indexoffset
- byte array offsetvoid putInt(long index, int offset, int value)
index
- array indexoffset
- byte array offsetvalue
- int valuelong getUnsignedInt(long index, int offset)
index
- array indexoffset
- byte array offsetvoid putUnsignedInt(long index, int offset, long value)
index
- array indexoffset
- byte array offsetvalue
- unsigned int as longlong getLong(long index, int offset)
index
- array indexoffset
- byte array offsetvoid putLong(long index, int offset, long value)
index
- array indexoffset
- byte array offsetvalue
- long valueCopyright © 2014. All Rights Reserved.