public interface Memory
| Modifier and Type | Interface and Description |
|---|---|
static class |
Memory.Util
Memory utilities.
|
| Modifier and Type | Method and Description |
|---|---|
long |
address()
Returns the memory address.
|
long |
address(int offset)
Returns the memory address for the given offset.
|
MemoryAllocator |
allocator()
Returns the memory allocator that allocated this memory.
|
void |
clear()
Clears the memory.
|
Memory |
copy()
Copies the memory to a distinct memory address.
|
void |
free()
Frees the memory.
|
byte |
getByte(int offset)
Fetches a byte from the given memory offset.
|
char |
getChar(int offset)
Fetches a character from the given memory offset.
|
double |
getDouble(int offset)
Fetches a double from the given memory offset.
|
float |
getFloat(int offset)
Fetches a float from the given memory offset.
|
int |
getInt(int offset)
Fetches an integer from the given memory offset.
|
long |
getLong(int offset)
Fetches a long from the given memory offset.
|
short |
getShort(int offset)
Fetches a short from the given memory offset.
|
void |
putByte(int offset,
byte b)
Stores a byte at the given memory offset.
|
void |
putChar(int offset,
char c)
Stores a character at the given memory offset.
|
void |
putDouble(int offset,
double d)
Stores a double at the given memory offset.
|
void |
putFloat(int offset,
float f)
Stores a float at the given memory offset.
|
void |
putInt(int offset,
int i)
Stores an integer at the given memory offset.
|
void |
putLong(int offset,
long l)
Stores a long at the given memory offset.
|
void |
putShort(int offset,
short s)
Stores a short at the given memory offset.
|
int |
size()
Returns the memory count.
|
MemoryAllocator allocator()
long address()
long address(int offset)
offset - The offset for which to return the address.int size()
byte getByte(int offset)
offset - The offset from which to fetch the byte.char getChar(int offset)
offset - The offset from which to fetch the character.short getShort(int offset)
offset - The offset from which to fetch the short.int getInt(int offset)
offset - The offset from which to fetch the integer.long getLong(int offset)
offset - The offset from which to fetch the long.float getFloat(int offset)
offset - The offset from which to fetch the float.double getDouble(int offset)
offset - The offset from which to fetch the double.void putByte(int offset,
byte b)
offset - The offset at which to store the byte.b - The byte to store.void putChar(int offset,
char c)
offset - The offset at which to store the character.c - The character to store.void putShort(int offset,
short s)
offset - The offset at which to store the short.s - The short to store.void putInt(int offset,
int i)
offset - The offset at which to store the integer.i - The integer to store.void putLong(int offset,
long l)
offset - The offset at which to store the long.l - The long to store.void putFloat(int offset,
float f)
offset - The offset at which to store the float.f - The float to store.void putDouble(int offset,
double d)
offset - The offset at which to store the double.d - The double to store.Memory copy()
void clear()
void free()
Copyright © 2013–2017. All rights reserved.