com.kenai.jaffl
public abstract class MemoryIO extends Object implements Pointer
Method Summary | |
---|---|
abstract long | address()
Gets the native address of this memory object (optional operation).
|
static MemoryIO | allocate(int size)
Allocates a new block of java heap memory and wraps it in a MemoryIO
accessor.
|
static MemoryIO | allocateDirect(int size)
Allocates a new block of native memory and wraps it in a MemoryIO
accessor.
|
static MemoryIO | allocateDirect(int size, boolean clear)
Allocates a new block of native memory and wraps it in a MemoryIO
accessor.
|
abstract void | get(long offset, byte[] dst, int idx, int len)
Bulk byte get method.
|
abstract void | get(long offset, short[] dst, int idx, int len)
Bulk short get method.
|
abstract void | get(long offset, int[] dst, int idx, int len)
Bulk int get method.
|
abstract void | get(long offset, long[] dst, int idx, int len)
Bulk long get method.
|
abstract void | get(long offset, float[] dst, int idx, int len)
Bulk float get method.
|
abstract void | get(long offset, double[] dst, int idx, int len)
Bulk double get method.
|
abstract long | getAddress(long offset) |
abstract byte | getByte(long offset)
Reads a 8 bit integer at the given offset.
|
abstract double | getDouble(long offset)
Reads a 64 bit floating point value at the given offset.
|
abstract float | getFloat(long offset)
Reads a 32 bit floating point value at the given offset.
|
abstract int | getInt(long offset)
Reads a 32 bit integer at the given offset.
|
abstract long | getLong(long offset)
Reads a 64 bit integer at the given offset.
|
abstract MemoryIO | getMemoryIO(long offset) |
abstract MemoryIO | getMemoryIO(long offset, long size) |
abstract long | getNativeLong(long offset) |
abstract Pointer | getPointer(long offset) |
abstract short | getShort(long offset)
Reads a 16 bit integer at the given offset.
|
abstract String | getString(long offset, int maxLength, Charset cs) |
abstract String | getString(long offset) |
abstract int | indexOf(long offset, byte value) |
abstract int | indexOf(long offset, byte value, int maxlen) |
abstract boolean | isDirect()
Tells whether or not this memory object is direct.
|
abstract void | put(long offset, byte[] src, int idx, int len)
Bulk byte put method.
|
abstract void | put(long offset, short[] src, int idx, int len)
Bulk short put method.
|
abstract void | put(long offset, int[] src, int idx, int len)
Bulk int put method.
|
abstract void | put(long offset, long[] src, int idx, int len)
Bulk long put method.
|
abstract void | put(long offset, float[] src, int idx, int len)
Bulk float put method.
|
abstract void | put(long offset, double[] src, int idx, int len)
Bulk double put method.
|
abstract void | putAddress(long offset, long value) |
abstract void | putAddress(long offset, Address value) |
abstract void | putByte(long offset, byte value)
Writes an 8 bit integer value at the given offset.
|
abstract void | putDouble(long offset, double value)
Writes a 64 bit floating point value at the given offset.
|
abstract void | putFloat(long offset, float value)
Writes a 32 bit floating point value at the given offset.
|
abstract void | putInt(long offset, int value)
Writes a 32 bit integer value at the given offset.
|
abstract void | putLong(long offset, long value)
Writes a 64 bit integer value at the given offset.
|
abstract void | putNativeLong(long offset, long value) |
abstract void | putPointer(long offset, Pointer value) |
abstract void | putShort(long offset, short value)
Writes a 16 bit integer value at the given offset.
|
abstract void | putString(long offset, String string, int maxLength, Charset cs) |
abstract void | setMemory(long offset, long size, byte value) |
abstract MemoryIO | slice(long offset) |
abstract MemoryIO | slice(long offset, long size) |
abstract void | transferTo(long offset, MemoryIO other, long otherOffset, long count) |
static MemoryIO | wrap(Pointer ptr) |
static MemoryIO | wrap(Pointer ptr, int size) |
static MemoryIO | wrap(ByteBuffer buffer) |
Returns: The native address of this memory object.
Throws: UnsupportedOperationException If this memory object is not backed by native memory.
Parameters: size The size in bytes of memory to allocate.
Returns: A new MemoryIO instance that can access the memory.
Parameters: size The size in bytes of memory to allocate.
Returns: A new MemoryIO instance that can access the memory.
Parameters: size The size in bytes of memory to allocate. clear Whether the memory contents should be cleared, or left as random data.
Returns: A new MemoryIO instance that can access the memory.
Parameters: offset The offset at which the values will be read. dst The array into which values are to be written. idx 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.
Parameters: offset The offset at which the values will be read. dst The array into which values are to be written. idx 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.
Parameters: offset The offset at which the values will be read. dst The array into which values are to be written. idx 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.
Parameters: offset The offset at which the values will be read. dst The array into which values are to be written. idx 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.
Parameters: offset The offset at which the values will be read. dst The array into which values are to be written. idx 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.
Parameters: offset The offset at which the values will be read. dst The array into which values are to be written. idx 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.
Parameters: offset The offset from which the integer will be read.
Returns: The byte value at the offset.
Parameters: offset The offset from which the integer will be read.
Returns: The double value at the offset.
Parameters: offset The offset from which the integer will be read.
Returns: The float value at the offset.
Parameters: offset The offset from which the integer will be read.
Returns: The int value at the offset.
Parameters: offset The offset from which the integer will be read.
Returns: The long value at the offset.
Parameters: offset The offset from which the integer will be read.
Returns: The short value at the offset.
Returns: true if, and only if, this memory object is direct
Parameters: offset The offset at which the values will be written. src The source array from which values are to be read. idx 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.
Parameters: offset The offset at which the values will be written. src The source array from which values are to be read. idx 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.
Parameters: offset The offset at which the values will be written. src The source array from which values are to be read. idx 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.
Parameters: offset The offset at which the values will be written. src The source array from which values are to be read. idx 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.
Parameters: offset The offset at which the values will be written. src The source array from which values are to be read. idx 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.
Parameters: offset The offset at which the values will be written. src The source array from which values are to be read. idx 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.
Parameters: offset The offset at which the value will be written. value The value to be written.
Parameters: offset The offset at which the value will be written. value The value to be written.
Parameters: offset The offset at which the value will be written. value The value to be written.
Parameters: offset The offset at which the value will be written. value The value to be written.
Parameters: offset The offset at which the value will be written. value The value to be written.
Parameters: offset The offset at which the value will be written. value The value to be written.