|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.kenai.jaffl.MemoryIO
com.kenai.jaffl.provider.AbstractMemoryIO
com.kenai.jaffl.provider.AbstractArrayMemoryIO
public abstract class AbstractArrayMemoryIO
Nested Class Summary | |
---|---|
protected static class |
AbstractArrayMemoryIO.ArrayIO
|
Field Summary | |
---|---|
protected byte[] |
buffer
|
protected static AbstractArrayMemoryIO.ArrayIO |
IO
|
protected int |
length
|
protected static int |
LONG_SIZE
|
protected int |
offset
|
Fields inherited from interface com.kenai.jaffl.Pointer |
---|
SIZE |
Constructor Summary | |
---|---|
AbstractArrayMemoryIO(byte[] buffer)
|
|
AbstractArrayMemoryIO(byte[] buffer,
int offset,
int length)
|
|
AbstractArrayMemoryIO(int size)
|
Method Summary | |
---|---|
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)
|
Methods inherited from class com.kenai.jaffl.provider.AbstractMemoryIO |
---|
checkBounds, getNativeLong, putAddress, putNativeLong, slice, slice, transferFrom, transferTo |
Methods inherited from class com.kenai.jaffl.MemoryIO |
---|
allocate, allocateDirect, allocateDirect, getMemoryIO, getMemoryIO, getPointer, putPointer, wrap, wrap, wrap |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final AbstractArrayMemoryIO.ArrayIO IO
protected static final int LONG_SIZE
protected final byte[] buffer
protected final int offset
protected final int length
Constructor Detail |
---|
public AbstractArrayMemoryIO(byte[] buffer, int offset, int length)
public AbstractArrayMemoryIO(byte[] buffer)
public AbstractArrayMemoryIO(int size)
Method Detail |
---|
public final byte[] array()
public final int offset()
public final int length()
public final boolean isDirect()
MemoryIO
isDirect
in interface Pointer
isDirect
in class MemoryIO
public long address()
MemoryIO
address
in interface Pointer
address
in class MemoryIO
protected final int index(long off)
public final boolean isNull()
public java.lang.String getString(long offset)
getString
in interface Pointer
getString
in class MemoryIO
public java.lang.String getString(long offset, int maxLength, java.nio.charset.Charset cs)
getString
in class MemoryIO
public void putString(long offset, java.lang.String string, int maxLength, java.nio.charset.Charset cs)
putString
in class MemoryIO
public final byte getByte(long offset)
MemoryIO
getByte
in interface Pointer
getByte
in class MemoryIO
offset
- The offset from which the integer will be read.
public final short getShort(long offset)
MemoryIO
getShort
in interface Pointer
getShort
in class MemoryIO
offset
- The offset from which the integer will be read.
public final int getInt(long offset)
MemoryIO
getInt
in interface Pointer
getInt
in class MemoryIO
offset
- The offset from which the integer will be read.
public final long getLong(long offset)
MemoryIO
getLong
in interface Pointer
getLong
in class MemoryIO
offset
- The offset from which the integer will be read.
public final long getAddress(long offset)
getAddress
in class AbstractMemoryIO
public final float getFloat(long offset)
MemoryIO
getFloat
in interface Pointer
getFloat
in class MemoryIO
offset
- The offset from which the integer will be read.
public final double getDouble(long offset)
MemoryIO
getDouble
in interface Pointer
getDouble
in class MemoryIO
offset
- The offset from which the integer will be read.
public final void putByte(long offset, byte value)
MemoryIO
putByte
in interface Pointer
putByte
in class MemoryIO
offset
- The offset at which the value will be written.value
- The value to be written.public final void putShort(long offset, short value)
MemoryIO
putShort
in interface Pointer
putShort
in class MemoryIO
offset
- The offset at which the value will be written.value
- The value to be written.public final void putInt(long offset, int value)
MemoryIO
putInt
in interface Pointer
putInt
in class MemoryIO
offset
- The offset at which the value will be written.value
- The value to be written.public final void putLong(long offset, long value)
MemoryIO
putLong
in interface Pointer
putLong
in class MemoryIO
offset
- The offset at which the value will be written.value
- The value to be written.public final void putAddress(long offset, long value)
putAddress
in class AbstractMemoryIO
public final void putFloat(long offset, float value)
MemoryIO
putFloat
in interface Pointer
putFloat
in class MemoryIO
offset
- The offset at which the value will be written.value
- The value to be written.public final void putDouble(long offset, double value)
MemoryIO
putDouble
in interface Pointer
putDouble
in class MemoryIO
offset
- The offset at which the value will be written.value
- The value to be written.public final 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 final void put(long offset, byte[] src, int off, int len)
MemoryIO
put
in interface Pointer
put
in class MemoryIO
offset
- 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)
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 final void put(long offset, short[] src, int off, int len)
MemoryIO
put
in interface Pointer
put
in class MemoryIO
offset
- 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)
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 final void put(long offset, int[] src, int off, int len)
MemoryIO
put
in interface Pointer
put
in class MemoryIO
offset
- 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)
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 final void put(long offset, long[] src, int off, int len)
MemoryIO
put
in interface Pointer
put
in class MemoryIO
offset
- 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)
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 final void put(long offset, float[] src, int off, int len)
MemoryIO
put
in interface Pointer
put
in class MemoryIO
offset
- 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)
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 final void put(long offset, double[] src, int off, int len)
MemoryIO
put
in interface Pointer
put
in class MemoryIO
offset
- 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 AbstractMemoryIO
public final int indexOf(long offset, byte value, int maxlen)
indexOf
in class MemoryIO
public final void setMemory(long offset, long size, byte value)
setMemory
in class MemoryIO
public final void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |