public abstract class MemoryUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static boolean |
INVERTED_ORDER |
Constructor and Description |
---|
MemoryUtil() |
Modifier and Type | Method and Description |
---|---|
static byte |
getByte(long address) |
static java.nio.ByteBuffer |
getByteBuffer(long address,
int length) |
static void |
getBytes(long address,
byte[] buffer,
int bufferOffset,
int count)
Transfers count bytes from Memory starting at memoryOffset to buffer starting at bufferOffset
|
static int |
getInt(long address) |
static int |
getIntByByte(long address) |
static long |
getLong(long address) |
static long |
getLongByByte(long address) |
static int |
getShort(long address) |
static int |
getShortByByte(long address) |
static void |
putIntByByte(long address,
int value) |
static void |
putLongByByte(long address,
long value) |
static void |
setByte(long address,
byte b) |
static void |
setBytes(byte[] src,
int offset,
long trg,
long count) |
static void |
setBytes(long address,
byte[] buffer,
int bufferOffset,
int count)
Transfers count bytes from buffer to Memory
|
static void |
setBytes(long address,
java.nio.ByteBuffer buffer) |
static void |
setBytes(long src,
long trg,
long count) |
static void |
setInt(long address,
int l) |
static void |
setLong(long address,
long l) |
static void |
setShort(long address,
short s) |
public static void setByte(long address, byte b)
public static void setShort(long address, short s)
public static void setInt(long address, int l)
public static void setLong(long address, long l)
public static byte getByte(long address)
public static int getShort(long address)
public static int getInt(long address)
public static long getLong(long address)
public static java.nio.ByteBuffer getByteBuffer(long address, int length)
public static long getLongByByte(long address)
public static int getIntByByte(long address)
public static int getShortByByte(long address)
public static void putLongByByte(long address, long value)
public static void putIntByByte(long address, int value)
public static void setBytes(long address, java.nio.ByteBuffer buffer)
public static void setBytes(long address, byte[] buffer, int bufferOffset, int count)
address
- start offset in the memorybuffer
- the data bufferbufferOffset
- start offset of the buffercount
- number of bytes to transferpublic static void setBytes(long src, long trg, long count)
public static void setBytes(byte[] src, int offset, long trg, long count)
public static void getBytes(long address, byte[] buffer, int bufferOffset, int count)
address
- start offset in the memorybuffer
- the data bufferbufferOffset
- start offset of the buffercount
- number of bytes to transferCopyright © 2016 The Apache Software Foundation