public class BoundedMemoryIO extends AbstractMemoryIO implements DelegatingMemoryIO
Constructor and Description |
---|
BoundedMemoryIO(MemoryIO parent,
long offset,
long size) |
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.
|
long |
getAddress(long offset) |
byte |
getByte(long offset)
Reads a 8 bit integer at the given offset.
|
MemoryIO |
getDelegatedMemoryIO() |
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.
|
MemoryIO |
getMemoryIO(long offset) |
MemoryIO |
getMemoryIO(long offset,
long size) |
Pointer |
getPointer(long 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) |
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.
|
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 |
putAddress(long offset,
Address value) |
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 |
putPointer(long offset,
Pointer value) |
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, putNativeLong, slice, slice, transferFrom, transferTo
allocate, allocateDirect, allocateDirect, wrap, wrap, wrap
public BoundedMemoryIO(MemoryIO parent, long offset, long size)
public boolean isDirect()
MemoryIO
public long address()
MemoryIO
public MemoryIO getDelegatedMemoryIO()
getDelegatedMemoryIO
in interface DelegatingMemoryIO
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 Pointer getPointer(long offset)
getPointer
in interface Pointer
getPointer
in class MemoryIO
public MemoryIO getMemoryIO(long offset)
getMemoryIO
in class MemoryIO
public MemoryIO getMemoryIO(long offset, long size)
getMemoryIO
in class 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 void putPointer(long offset, Pointer value)
putPointer
in interface Pointer
putPointer
in class MemoryIO
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 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 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 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 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 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 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 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 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 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 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, 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 long getAddress(long offset)
getAddress
in class AbstractMemoryIO
public java.lang.String getString(long offset, int maxLength, java.nio.charset.Charset cs)
public java.lang.String getString(long offset)
public void putAddress(long offset, long value)
putAddress
in class AbstractMemoryIO
public void putAddress(long offset, Address value)
putAddress
in class AbstractMemoryIO
public void putString(long offset, java.lang.String string, int maxLength, java.nio.charset.Charset cs)
public int indexOf(long offset, byte value)
indexOf
in class AbstractMemoryIO
public int indexOf(long offset, byte value, int maxlen)