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, transferTo
allocate, allocateDirect, allocateDirect, getMemoryIO, getMemoryIO, getPointer, putPointer, wrap, wrap, wrap
public final boolean isDirect()
MemoryIO
public long address()
MemoryIO
public final java.nio.ByteBuffer getByteBuffer()
public byte getByte(long offset)
MemoryIO
public short getShort(long offset)
MemoryIO
public int getInt(long offset)
MemoryIO
public long getLong(long offset)
MemoryIO
public float getFloat(long offset)
MemoryIO
public double getDouble(long offset)
MemoryIO
public void putByte(long offset, byte value)
MemoryIO
public void putShort(long offset, short value)
MemoryIO
public void putInt(long offset, int value)
MemoryIO
public void putLong(long offset, long value)
MemoryIO
public void putFloat(long offset, float value)
MemoryIO
public void putDouble(long offset, double value)
MemoryIO
public 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)
MemoryIO
get
in interface Pointer
get
in class MemoryIO
offset
- 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)
MemoryIO
get
in interface Pointer
get
in class MemoryIO
offset
- 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)
MemoryIO
get
in interface Pointer
get
in class MemoryIO
offset
- 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)
MemoryIO
get
in interface Pointer
get
in class MemoryIO
offset
- 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)
MemoryIO
get
in interface Pointer
get
in class MemoryIO
offset
- 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)
MemoryIO
get
in interface Pointer
get
in class MemoryIO
offset
- 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)
MemoryIO
put
in interface Pointer
put
in class MemoryIO
offset
- 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)
MemoryIO
put
in interface Pointer
put
in class MemoryIO
offset
- 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)
MemoryIO
put
in interface Pointer
put
in class MemoryIO
offset
- 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)
MemoryIO
put
in interface Pointer
put
in class MemoryIO
offset
- 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)
MemoryIO
put
in interface Pointer
put
in class MemoryIO
offset
- 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)
MemoryIO
put
in interface Pointer
put
in class MemoryIO
offset
- 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)