public interface MemoryAccessor
Modifier and Type | Method and Description |
---|---|
void |
copyFromByteArray(byte[] source,
int offset,
long destAddress,
int length)
Copies bytes from a Java byte array into this accessor's address space.
|
void |
copyMemory(long srcAddress,
long destAddress,
long lengthBytes)
Copies memory from given source address to given destination address
as given size.
|
void |
copyToByteArray(long srcAddress,
byte[] destination,
int offset,
int length)
Copies bytes from this accessor's address space to a Java byte array.
|
boolean |
getBoolean(long address)
Reads the boolean value from given address.
|
byte |
getByte(long address)
Reads the byte value from given address.
|
char |
getChar(long address)
Reads the char value from given address.
|
double |
getDouble(long address)
Reads the double value from given address.
|
float |
getFloat(long address)
Reads the float value from given address.
|
int |
getInt(long address)
Reads the int value from given address.
|
long |
getLong(long address)
Reads the long value from given address.
|
short |
getShort(long address)
Reads the short value from given address.
|
boolean |
isBigEndian()
Tells whether this memory accessor is big- or little-endian.
|
void |
putBoolean(long address,
boolean x)
Writes the given boolean value to given address.
|
void |
putByte(long address,
byte x)
Writes the given byte value to given address.
|
void |
putChar(long address,
char x)
Writes the given char value to given address.
|
void |
putDouble(long address,
double x)
Writes the given double value to given address.
|
void |
putFloat(long address,
float x)
Writes the given float value to given address.
|
void |
putInt(long address,
int x)
Writes the given int value to given address.
|
void |
putLong(long address,
long x)
Writes the given long value to given address.
|
void |
putShort(long address,
short x)
Writes the given short value to given address.
|
void |
setMemory(long address,
long lengthBytes,
byte value)
Sets memory with given value from specified address as given size.
|
boolean isBigEndian()
get/putChar
, get/putShort
,
get/putInt
, get/putLong
declared in this interface and others declared
in subinterfaces).true
if the accessor is big-endian; false
otherwiseboolean getBoolean(long address)
address
- the address where the boolean value will be read fromvoid putBoolean(long address, boolean x)
address
- the address where the boolean value will be written tox
- the boolean value to be writtenbyte getByte(long address)
address
- the address where the byte value will be read fromvoid putByte(long address, byte x)
address
- the address where the byte value will be written tox
- the byte value to be writtenchar getChar(long address)
address
- the address where the char value will be read fromvoid putChar(long address, char x)
address
- the address where the char value will be written tox
- the char value to be writtenshort getShort(long address)
address
- the address where the short value will be read fromvoid putShort(long address, short x)
address
- the address where the short value will be written tox
- the short value to be writtenint getInt(long address)
address
- the address where the int value will be read fromvoid putInt(long address, int x)
address
- the address where the int value will be written tox
- the int value to be writtenfloat getFloat(long address)
address
- the address where the float value will be read fromvoid putFloat(long address, float x)
address
- the address where the float value will be written tox
- the float value to be writtenlong getLong(long address)
address
- the address where the long value will be read fromvoid putLong(long address, long x)
address
- the address where the long value will be written tox
- the long value to be writtendouble getDouble(long address)
address
- the address where the double value will be read fromvoid putDouble(long address, double x)
address
- the address where the double value will be written tox
- the double value to be writtenvoid copyMemory(long srcAddress, long destAddress, long lengthBytes)
srcAddress
- the source address to be copied fromdestAddress
- the destination address to be copied tolengthBytes
- the number of bytes to be copiedvoid copyFromByteArray(byte[] source, int offset, long destAddress, int length)
source
- the source byte arrayoffset
- index of the first byte to copydestAddress
- address where the first byte will be writtenlength
- number of bytes to copyvoid copyToByteArray(long srcAddress, byte[] destination, int offset, int length)
srcAddress
- address of the first byte to copydestination
- the destination byte arrayoffset
- array index where the first byte will be writtenlength
- number of bytes to copyvoid setMemory(long address, long lengthBytes, byte value)
address
- the start address of the memory region
which will be set with the given valuelengthBytes
- the number of bytes to be setvalue
- the value to be setCopyright © 2021 Hazelcast, Inc.. All Rights Reserved.