public abstract class AbstractBufferMemoryIO extends AbstractMemoryIO
| Modifier and Type | Field and Description |
|---|---|
protected java.nio.ByteBuffer |
buffer |
| Constructor and Description |
|---|
AbstractBufferMemoryIO(java.nio.ByteBuffer buffer) |
| Modifier and Type | Method and Description |
|---|---|
long |
address()
Gets the native address of this memory object (optional operation).
|
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.
|
byte |
getByte(long offset)
Reads a 8 bit integer at the given offset.
|
java.nio.ByteBuffer |
getByteBuffer() |
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 size) |
java.lang.String |
getString(long offset,
int maxLength,
java.nio.charset.Charset cs) |
int |
indexOf(long offset,
byte value,
int maxlen) |
boolean |
isDirect()
Tells whether or not this memory object is direct.
|
void |
put(long offset,
byte[] dst,
int off,
int len)
Bulk byte put method.
|
void |
put(long offset,
double[] dst,
int off,
int len)
Bulk double put method.
|
void |
put(long offset,
float[] dst,
int off,
int len)
Bulk float put method.
|
void |
put(long offset,
int[] dst,
int off,
int len)
Bulk int put method.
|
void |
put(long offset,
long[] dst,
int off,
int len)
Bulk long put method.
|
void |
put(long offset,
short[] dst,
int off,
int len)
Bulk short put method.
|
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) |
void |
putString(long offset,
java.lang.String string,
int maxLength,
java.nio.charset.Charset cs) |
void |
setMemory(long offset,
long size,
byte value) |
checkBounds, getAddress, getNativeLong, indexOf, putAddress, putAddress, putNativeLong, slice, slice, transferFrom, transferToallocate, allocateDirect, allocateDirect, getMemoryIO, getMemoryIO, getPointer, putPointer, wrap, wrap, wrappublic final boolean isDirect()
MemoryIOpublic long address()
MemoryIOpublic final java.nio.ByteBuffer getByteBuffer()
public byte getByte(long offset)
MemoryIOpublic short getShort(long offset)
MemoryIOpublic int getInt(long offset)
MemoryIOpublic long getLong(long offset)
MemoryIOpublic float getFloat(long offset)
MemoryIOpublic double getDouble(long offset)
MemoryIOpublic void putByte(long offset,
byte value)
MemoryIOpublic void putShort(long offset,
short value)
MemoryIOpublic void putInt(long offset,
int value)
MemoryIOpublic void putLong(long offset,
long value)
MemoryIOpublic void putFloat(long offset,
float value)
MemoryIOpublic void putDouble(long offset,
double value)
MemoryIOpublic java.lang.String getString(long offset,
int size)
public void putString(long offset,
java.lang.String string)
public 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 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 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 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 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 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 void put(long offset,
byte[] dst,
int off,
int len)
MemoryIOput in interface Pointerput in class MemoryIOoffset - The offset at which the values will be written.dst - 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 void put(long offset,
short[] dst,
int off,
int len)
MemoryIOput in interface Pointerput in class MemoryIOoffset - The offset at which the values will be written.dst - 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 void put(long offset,
int[] dst,
int off,
int len)
MemoryIOput in interface Pointerput in class MemoryIOoffset - The offset at which the values will be written.dst - 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 void put(long offset,
long[] dst,
int off,
int len)
MemoryIOput in interface Pointerput in class MemoryIOoffset - The offset at which the values will be written.dst - 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 void put(long offset,
float[] dst,
int off,
int len)
MemoryIOput in interface Pointerput in class MemoryIOoffset - The offset at which the values will be written.dst - 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 void put(long offset,
double[] dst,
int off,
int len)
MemoryIOput in interface Pointerput in class MemoryIOoffset - The offset at which the values will be written.dst - 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 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 int indexOf(long offset,
byte value,
int maxlen)