public abstract class AbstractArrayMemoryIO extends AbstractMemoryIO
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractArrayMemoryIO.ArrayIO |
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
buffer |
protected static AbstractArrayMemoryIO.ArrayIO |
IO |
protected int |
length |
protected static int |
LONG_SIZE |
protected int |
offset |
| Constructor and Description |
|---|
AbstractArrayMemoryIO(byte[] buffer) |
AbstractArrayMemoryIO(byte[] buffer,
int offset,
int length) |
AbstractArrayMemoryIO(int size) |
| Modifier and Type | Method and Description |
|---|---|
long |
address()
Gets the native address of this memory object (optional operation).
|
byte[] |
array() |
void |
clear() |
void |
get(long offset,
byte[] dst,
int off,
int len)
Bulk byte get method.
|
void |
get(long offset,
double[] dst,
int off,
int len)
Bulk double get method.
|
void |
get(long offset,
float[] dst,
int off,
int len)
Bulk float get method.
|
void |
get(long offset,
int[] dst,
int off,
int len)
Bulk int get method.
|
void |
get(long offset,
long[] dst,
int off,
int len)
Bulk long get method.
|
void |
get(long offset,
short[] dst,
int off,
int len)
Bulk short get method.
|
long |
getAddress(long offset) |
byte |
getByte(long offset)
Reads a 8 bit integer at the given offset.
|
double |
getDouble(long offset)
Reads a 64 bit floating point value at the given offset.
|
float |
getFloat(long offset)
Reads a 32 bit floating point value at the given offset.
|
int |
getInt(long offset)
Reads a 32 bit integer at the given offset.
|
long |
getLong(long offset)
Reads a 64 bit integer at the given offset.
|
short |
getShort(long offset)
Reads a 16 bit integer at the given offset.
|
java.lang.String |
getString(long offset) |
java.lang.String |
getString(long offset,
int maxLength,
java.nio.charset.Charset cs) |
protected int |
index(long off) |
int |
indexOf(long offset,
byte value) |
int |
indexOf(long offset,
byte value,
int maxlen) |
boolean |
isDirect()
Tells whether or not this memory object is direct.
|
boolean |
isNull() |
int |
length() |
int |
offset() |
void |
put(long offset,
byte[] src,
int off,
int len)
Bulk byte put method.
|
void |
put(long offset,
double[] src,
int off,
int len)
Bulk double put method.
|
void |
put(long offset,
float[] src,
int off,
int len)
Bulk float put method.
|
void |
put(long offset,
int[] src,
int off,
int len)
Bulk int put method.
|
void |
put(long offset,
long[] src,
int off,
int len)
Bulk long put method.
|
void |
put(long offset,
short[] src,
int off,
int len)
Bulk short put method.
|
void |
putAddress(long offset,
long value) |
void |
putByte(long offset,
byte value)
Writes an 8 bit integer value at the given offset.
|
void |
putDouble(long offset,
double value)
Writes a 64 bit floating point value at the given offset.
|
void |
putFloat(long offset,
float value)
Writes a 32 bit floating point value at the given offset.
|
void |
putInt(long offset,
int value)
Writes a 32 bit integer value at the given offset.
|
void |
putLong(long offset,
long value)
Writes a 64 bit integer value at the given offset.
|
void |
putShort(long offset,
short value)
Writes a 16 bit integer value at the given offset.
|
void |
putString(long offset,
java.lang.String string,
int maxLength,
java.nio.charset.Charset cs) |
void |
setMemory(long offset,
long size,
byte value) |
checkBounds, getNativeLong, putAddress, putNativeLong, slice, slice, transferFrom, transferToallocate, allocateDirect, allocateDirect, getMemoryIO, getMemoryIO, getPointer, putPointer, wrap, wrap, wrapprotected static final AbstractArrayMemoryIO.ArrayIO IO
protected static final int LONG_SIZE
protected final byte[] buffer
protected final int offset
protected final int length
public AbstractArrayMemoryIO(byte[] buffer,
int offset,
int length)
public AbstractArrayMemoryIO(byte[] buffer)
public AbstractArrayMemoryIO(int size)
public final byte[] array()
public final int offset()
public final int length()
public final boolean isDirect()
MemoryIOpublic long address()
MemoryIOprotected final int index(long off)
public final boolean isNull()
public java.lang.String getString(long offset)
public java.lang.String getString(long offset,
int maxLength,
java.nio.charset.Charset cs)
public void putString(long offset,
java.lang.String string,
int maxLength,
java.nio.charset.Charset cs)
public final byte getByte(long offset)
MemoryIOpublic final short getShort(long offset)
MemoryIOpublic final int getInt(long offset)
MemoryIOpublic final long getLong(long offset)
MemoryIOpublic final long getAddress(long offset)
getAddress in class AbstractMemoryIOpublic final float getFloat(long offset)
MemoryIOpublic final double getDouble(long offset)
MemoryIOpublic final void putByte(long offset,
byte value)
MemoryIOpublic final void putShort(long offset,
short value)
MemoryIOpublic final void putInt(long offset,
int value)
MemoryIOpublic final void putLong(long offset,
long value)
MemoryIOpublic final void putAddress(long offset,
long value)
putAddress in class AbstractMemoryIOpublic final void putFloat(long offset,
float value)
MemoryIOpublic final void putDouble(long offset,
double value)
MemoryIOpublic final void get(long offset,
byte[] dst,
int off,
int len)
MemoryIOget in interface Pointerget in class MemoryIOoffset - The offset at which the values will be read.dst - The array into which values are to be written.off - The index within the destination array of the first value to be written.len - The number of values to be written to the destination array.public final void put(long offset,
byte[] src,
int off,
int len)
MemoryIOput in interface Pointerput in class MemoryIOoffset - The offset at which the values will be written.src - The source array from which values are to be read.off - The index within the destination array of the first value to be read.len - The number of values to be read from the source array.public final void get(long offset,
short[] dst,
int off,
int len)
MemoryIOget in interface Pointerget in class MemoryIOoffset - The offset at which the values will be read.dst - The array into which values are to be written.off - The index within the destination array of the first value to be written.len - The number of values to be written to the destination array.public final void put(long offset,
short[] src,
int off,
int len)
MemoryIOput in interface Pointerput in class MemoryIOoffset - The offset at which the values will be written.src - The source array from which values are to be read.off - The index within the destination array of the first value to be read.len - The number of values to be read from the source array.public final void get(long offset,
int[] dst,
int off,
int len)
MemoryIOget in interface Pointerget in class MemoryIOoffset - The offset at which the values will be read.dst - The array into which values are to be written.off - The index within the destination array of the first value to be written.len - The number of values to be written to the destination array.public final void put(long offset,
int[] src,
int off,
int len)
MemoryIOput in interface Pointerput in class MemoryIOoffset - The offset at which the values will be written.src - The source array from which values are to be read.off - The index within the destination array of the first value to be read.len - The number of values to be read from the source array.public final void get(long offset,
long[] dst,
int off,
int len)
MemoryIOget in interface Pointerget in class MemoryIOoffset - The offset at which the values will be read.dst - The array into which values are to be written.off - The index within the destination array of the first value to be written.len - The number of values to be written to the destination array.public final void put(long offset,
long[] src,
int off,
int len)
MemoryIOput in interface Pointerput in class MemoryIOoffset - The offset at which the values will be written.src - The source array from which values are to be read.off - The index within the destination array of the first value to be read.len - The number of values to be read from the source array.public final void get(long offset,
float[] dst,
int off,
int len)
MemoryIOget in interface Pointerget in class MemoryIOoffset - The offset at which the values will be read.dst - The array into which values are to be written.off - The index within the destination array of the first value to be written.len - The number of values to be written to the destination array.public final void put(long offset,
float[] src,
int off,
int len)
MemoryIOput in interface Pointerput in class MemoryIOoffset - The offset at which the values will be written.src - The source array from which values are to be read.off - The index within the destination array of the first value to be read.len - The number of values to be read from the source array.public final void get(long offset,
double[] dst,
int off,
int len)
MemoryIOget in interface Pointerget in class MemoryIOoffset - The offset at which the values will be read.dst - The array into which values are to be written.off - The index within the destination array of the first value to be written.len - The number of values to be written to the destination array.public final void put(long offset,
double[] src,
int off,
int len)
MemoryIOput in interface Pointerput in class MemoryIOoffset - The offset at which the values will be written.src - The source array from which values are to be read.off - The index within the destination array of the first value to be read.len - The number of values to be read from the source array.public final int indexOf(long offset,
byte value)
indexOf in class AbstractMemoryIOpublic final int indexOf(long offset,
byte value,
int maxlen)
public final void setMemory(long offset,
long size,
byte value)
public final void clear()