Top Fields Constructors Methods
jnr.ffi.provider.jffi

pack-priv Class DirectMemoryIO

extends AbstractMemoryIO
Class Inheritance
Known Direct Subclasses
jnr.ffi.provider.jffi.TransientNativeMemory, jnr.ffi.provider.jffi.AllocatedDirectMemoryIO
Imports
jnr.ffi.Pointer, .Runtime, jnr.ffi.provider.AbstractMemoryIO, .DelegatingMemoryIO, java.nio.ByteBuffer, java.nio.charset.Charset

Field Summary

Modifier and TypeField and Description
pack-priv static final MemoryIO

Constructor Summary

AccessConstructor and Description
pack-priv
DirectMemoryIO(Runtime runtime, long address)

pack-priv
DirectMemoryIO(Runtime runtime, int address)

Method Summary

Modifier and TypeMethod and Description
public Object
array()

Implements abstract jnr.ffi.Pointer.array.

Returns the array that backs this pointer.
public int
arrayLength()

Implements abstract jnr.ffi.Pointer.arrayLength.

Returns the length of this pointer's backing array that is used by this pointer.
public int
arrayOffset()

Implements abstract jnr.ffi.Pointer.arrayOffset.

Returns the offset within this pointer's backing array of the first element.
public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public final void
get(long
the offset from the start of the memory this Pointer represents at which the first value will be read.
offset
,
byte[]
the array into which values are to be stored.
dst
,
int
the start index in the dst array to begin storing the values.
off
,
int
the number of values to be read.
len
)

Implements abstract jnr.ffi.Pointer.get.

Bulk get method for multiple byte values.
public final void
get(long
The offset from the start of the memory this Pointer represents at which the first value will be read.
offset
,
short[]
The array into which values are to be stored.
dst
,
int
the start index in the dst array to begin storing the values.
off
,
int
the number of values to be read.
len
)

Implements abstract jnr.ffi.Pointer.get.

Bulk get method for multiple short values.
public final void
get(long
The offset from the start of the memory this Pointer represents at which the first value will be read.
offset
,
int[]
The array into which values are to be stored.
dst
,
int
the start index in the dst array to begin storing the values.
off
,
int
the number of values to be read.
len
)

Implements abstract jnr.ffi.Pointer.get.

Bulk get method for multiple int values.
public final void
get(long
The offset from the start of the memory this Pointer represents at which the first value will be read.
offset
,
long[]
The array into which values are to be stored.
dst
,
int
the start index in the dst array to begin storing the values.
off
,
int
the number of values to be read.
len
)

Implements abstract jnr.ffi.Pointer.get.

Bulk get method for multiple long values.
public final void
get(long
The offset from the start of the memory this Pointer represents at which the first value will be read.
offset
,
float[]
The array into which values are to be stored.
dst
,
int
the start index in the dst array to begin storing the values.
off
,
int
the number of values to be read.
len
)

Implements abstract jnr.ffi.Pointer.get.

Bulk get method for multiple float values.
public final void
get(long
The offset from the start of the memory this Pointer represents at which the first value will be read.
offset
,
double[]
The array into which values are to be stored.
dst
,
int
the start index in the dst array to begin storing the values.
off
,
int
the number of values to be read.
len
)

Implements abstract jnr.ffi.Pointer.get.

Bulk get method for multiple double values.
public final byte
getByte(long
The offset from the start of the memory this Pointer represents at which the value will be read.
offset
)

Implements abstract jnr.ffi.Pointer.getByte.

Reads an byte (8 bit) value at the given offset.
public final double
getDouble(long
The offset from the start of the memory this Pointer represents at which the value will be read.
offset
)

Implements abstract jnr.ffi.Pointer.getDouble.

Reads a double (64 bit) value at the given offset.
public final float
getFloat(long
The offset from the start of the memory this Pointer represents at which the value will be read.
offset
)

Implements abstract jnr.ffi.Pointer.getFloat.

Reads a float (32 bit) value at the given offset.
public final int
getInt(long
The offset from the start of the memory this Pointer represents at which the value will be read.
offset
)

Implements abstract jnr.ffi.Pointer.getInt.

Reads an int (32 bit) value at the given offset.
public final long
getLongLong(long
The offset from the start of the memory this Pointer represents at which the value will be read.
offset
)

Implements abstract jnr.ffi.Pointer.getLongLong.

Reads a long (64 bit) value at the given offset.
public Pointer
getPointer(long
the offset from the start of the memory this Pointer represents at which the value will be read.
offset
)

Implements abstract jnr.ffi.Pointer.getPointer.

Reads an Pointer value at the given offset.
public Pointer
getPointer(long
the offset from the start of the memory this Pointer represents at which the value will be read.
offset
,
long
the maximum size of the memory location the returned Pointer represents.
size
)

Implements abstract jnr.ffi.Pointer.getPointer.

Reads an Pointer value at the given offset.
public final short
getShort(long
The offset from the start of the memory this Pointer represents at which the value will be read.
offset
)

Implements abstract jnr.ffi.Pointer.getShort.

Reads a short (16 bit) value at the given offset.
public String
getString(long
the offset from the start of the memory this Pointer represents at which the value will be read.
offset
)

Implements abstract jnr.ffi.Pointer.getString.

Reads an String value at the given offset.
public String
getString(long
the offset from the start of the memory this Pointer represents at which the value will be read.
offset
,
int
the maximum size of memory to search for a NUL byte.
maxLength
,
Charset
the Charset to use to decode the string.
cs
)

Implements abstract jnr.ffi.Pointer.getString.

Reads a String value at the given offset, using a specific Charset
public boolean
hasArray()

Implements abstract jnr.ffi.Pointer.hasArray.

Indicates whether this Pointer instance is backed by an array.
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.
public int
indexOf(long
the offset from the start of the memory location this Pointer represents to begin searching.
offset
,
byte
the byte value to locate.
value
,
int
the maximum number of bytes to search for the desired value.
maxlen
)

Implements abstract jnr.ffi.Pointer.indexOf.

Returns the location of a byte value within the memory area represented by this Pointer.
private static void
memcpy(DirectMemoryIO src, long srcOffset, DirectMemoryIO dst, long dstOffset, long count)

public final void
put(long
the offset from the start of the memory this Pointer represents at which the first value will be written.
offset
,
byte[]
the array to get values from.
src
,
int
the start index in the dst array to begin reading values.
off
,
int
the number of values to be written.
len
)

Implements abstract jnr.ffi.Pointer.put.

Bulk put method for multiple byte values.
public final void
put(long
the offset from the start of the memory this Pointer represents at which the first value will be written.
offset
,
short[]
the array to get values from.
src
,
int
the start index in the dst array to begin reading values.
off
,
int
the number of values to be written.
len
)

Implements abstract jnr.ffi.Pointer.put.

Bulk put method for multiple short values.
public final void
put(long
the offset from the start of the memory this Pointer represents at which the first value will be written.
offset
,
int[]
the array to get values from.
src
,
int
the start index in the dst array to begin reading values.
off
,
int
the number of values to be written.
len
)

Implements abstract jnr.ffi.Pointer.put.

Bulk put method for multiple int values.
public final void
put(long
the offset from the start of the memory this Pointer represents at which the first value will be written.
offset
,
long[]
the array to get values from.
src
,
int
the start index in the dst array to begin reading values.
off
,
int
the number of values to be written.
len
)

Implements abstract jnr.ffi.Pointer.put.

Bulk put method for multiple long values.
public final void
put(long
the offset from the start of the memory this Pointer represents at which the first value will be written.
offset
,
float[]
the array to get values from.
src
,
int
the start index in the dst array to begin reading values.
off
,
int
the number of values to be written.
len
)

Implements abstract jnr.ffi.Pointer.put.

Bulk put method for multiple float values.
public final void
put(long
the offset from the start of the memory this Pointer represents at which the first value will be written.
offset
,
double[]
the array to get values from.
src
,
int
the start index in the dst array to begin reading values.
off
,
int
the number of values to be written.
len
)

Implements abstract jnr.ffi.Pointer.put.

Bulk put method for multiple double values.
public final void
putByte(long
The offset from the start of the memory this Pointer represents at which the value will be written.
offset
,
byte
the byte value to be written.
value
)

Implements abstract jnr.ffi.Pointer.putByte.

Writes a byte (8 bit) value at the given offset.
public final void
putDouble(long
The offset from the start of the memory this Pointer represents at which the value will be written.
offset
,
double
the double value to be written.
value
)

Implements abstract jnr.ffi.Pointer.putDouble.

Writes a double (64 bit, double precision) value at the given offset.
public final void
putFloat(long
The offset from the start of the memory this Pointer represents at which the value will be written.
offset
,
float
the float value to be written.
value
)

Implements abstract jnr.ffi.Pointer.putFloat.

Writes a float (32 bit, single precision) value at the given offset.
public final void
putInt(long
The offset from the start of the memory this Pointer represents at which the value will be written.
offset
,
int
the int value to be written.
value
)

Implements abstract jnr.ffi.Pointer.putInt.

Writes an int (32 bit) value at the given offset.
public final void
putLongLong(long
The offset from the start of the memory this Pointer represents at which the value will be written.
offset
,
long
the long value to be written.
value
)

Implements abstract jnr.ffi.Pointer.putLongLong.

Writes a long (64 bit) value at the given offset.
public void
putPointer(long
The offset from the start of the memory this Pointer represents at which the value will be written.
offset
,
Pointer
the Pointer value to be written to memory.
value
)

Implements abstract jnr.ffi.Pointer.putPointer.

Writes a Pointer value at the given offset.
public final void
putShort(long
The offset from the start of the memory this Pointer represents at which the value will be written.
offset
,
short
the short value to be written.
value
)

Implements abstract jnr.ffi.Pointer.putShort.

Writes a short (16 bit) value at the given offset.
public void
putString(long
the offset from the start of the memory this Pointer represents at which the value will be written.
offset
,
String
the string to be written.
string
,
int
the maximum size of memory to use to store the string.
maxLength
,
Charset
the Charset to use to decode the string.
cs
)

Implements abstract jnr.ffi.Pointer.putString.

Writes a String value at the given offset, using a specific Charset
public void
putZeroTerminatedByteArray(long offset, byte[] src, int off, int len)

public final void
setMemory(long
the offset from the start of the memory location this Pointer represents to begin writing to.
offset
,
long
the number of bytes to set to the value.
size
,
byte
the value to set each byte to.
value
)

Implements abstract jnr.ffi.Pointer.setMemory.

Sets the value of each byte in the memory area represented by this Pointer.
public long
size()

Implements abstract jnr.ffi.Pointer.size.

Gets the size of this memory object in bytes (optional operation).
public void
transferFrom(long
the offset from the start of the memory location this Pointer represents to begin copying to.
offset
,
Pointer
the destination memory location to transfer data from.
other
,
long
the offset from the start of the memory location the destination Pointer represents to begin copying from.
otherOffset
,
long
the number of bytes to transfer.
count
)

Overrides jnr.ffi.provider.AbstractMemoryIO.transferFrom.

Bulk data transfer from one memory location to another.
public void
transferTo(long
the offset from the start of the memory location this Pointer represents to begin copying from.
offset
,
Pointer
the destination memory location to transfer data to.
other
,
long
the offset from the start of the memory location the destination Pointer represents to begin copying to.
otherOffset
,
long
the number of bytes to transfer.
count
)

Overrides jnr.ffi.provider.AbstractMemoryIO.transferTo.

Bulk data transfer from one memory location to another.
Inherited from jnr.ffi.provider.AbstractMemoryIO:
checkBoundscheckBoundsgetAddressgetIntgetLonggetNativeLongindexOfputAddressputAddressputIntputLongputNativeLongsliceslice

Field Detail

IOback to summary
pack-priv static final MemoryIO IO

Constructor Detail

DirectMemoryIOback to summary
pack-priv DirectMemoryIO(Runtime runtime, long address)
DirectMemoryIOback to summary
pack-priv DirectMemoryIO(Runtime runtime, int address)

Method Detail

arrayback to summary
public Object array()

Implements abstract jnr.ffi.Pointer.array.

Doc from jnr.ffi.Pointer.array.

Returns the array that backs this pointer.

Returns:Object

The array that backs this pointer.

Annotations
@Override
arrayLengthback to summary
public int arrayLength()

Implements abstract jnr.ffi.Pointer.arrayLength.

Doc from jnr.ffi.Pointer.arrayLength.

Returns the length of this pointer's backing array that is used by this pointer.

Returns:int

The length of the backing array used

Annotations
@Override
arrayOffsetback to summary
public int arrayOffset()

Implements abstract jnr.ffi.Pointer.arrayOffset.

Doc from jnr.ffi.Pointer.arrayOffset.

Returns the offset within this pointer's backing array of the first element.

Returns:int

The offset of the first element on the backing array

Annotations
@Override
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getback to summary
public final void get(long offset, byte[] dst, int off, int len)

Implements abstract jnr.ffi.Pointer.get.

Doc from jnr.ffi.Pointer.get.

Bulk get method for multiple byte values. This method reads multiple byte values from consecutive addresses, beginning at the given offset, and stores them in an array.

Parameters
offset:long

the offset from the start of the memory this Pointer represents at which the first value will be read.

dst:byte[]

the array into which values are to be stored.

off:int

the start index in the dst array to begin storing the values.

len:int

the number of values to be read.

getback to summary
public final void get(long offset, short[] dst, int off, int len)

Implements abstract jnr.ffi.Pointer.get.

Doc from jnr.ffi.Pointer.get.

Bulk get method for multiple short values. This method reads multiple short values from consecutive addresses, beginning at the given offset, and stores them in an array.

Parameters
offset:long

The offset from the start of the memory this Pointer represents at which the first value will be read.

dst:short[]

The array into which values are to be stored.

off:int

the start index in the dst array to begin storing the values.

len:int

the number of values to be read.

getback to summary
public final void get(long offset, int[] dst, int off, int len)

Implements abstract jnr.ffi.Pointer.get.

Doc from jnr.ffi.Pointer.get.

Bulk get method for multiple int values. This method reads multiple int values from consecutive addresses, beginning at the given offset, and stores them in an array.

Parameters
offset:long

The offset from the start of the memory this Pointer represents at which the first value will be read.

dst:int[]

The array into which values are to be stored.

off:int

the start index in the dst array to begin storing the values.

len:int

the number of values to be read.

getback to summary
public final void get(long offset, long[] dst, int off, int len)

Implements abstract jnr.ffi.Pointer.get.

Doc from jnr.ffi.Pointer.get.

Bulk get method for multiple long values. This method reads multiple long values from consecutive addresses, beginning at the given offset, and stores them in an array.

Parameters
offset:long

The offset from the start of the memory this Pointer represents at which the first value will be read.

dst:long[]

The array into which values are to be stored.

off:int

the start index in the dst array to begin storing the values.

len:int

the number of values to be read.

getback to summary
public final void get(long offset, float[] dst, int off, int len)

Implements abstract jnr.ffi.Pointer.get.

Doc from jnr.ffi.Pointer.get.

Bulk get method for multiple float values. This method reads multiple float values from consecutive addresses, beginning at the given offset, and stores them in an array.

Parameters
offset:long

The offset from the start of the memory this Pointer represents at which the first value will be read.

dst:float[]

The array into which values are to be stored.

off:int

the start index in the dst array to begin storing the values.

len:int

the number of values to be read.

getback to summary
public final void get(long offset, double[] dst, int off, int len)

Implements abstract jnr.ffi.Pointer.get.

Doc from jnr.ffi.Pointer.get.

Bulk get method for multiple double values. This method reads multiple double values from consecutive addresses, beginning at the given offset, and stores them in an array.

Parameters
offset:long

The offset from the start of the memory this Pointer represents at which the first value will be read.

dst:double[]

The array into which values are to be stored.

off:int

the start index in the dst array to begin storing the values.

len:int

the number of values to be read.

getByteback to summary
public final byte getByte(long offset)

Implements abstract jnr.ffi.Pointer.getByte.

Doc from jnr.ffi.Pointer.getByte.

Reads an byte (8 bit) value at the given offset.

Parameters
offset:long

The offset from the start of the memory this Pointer represents at which the value will be read.

Returns:byte

the byte value at the offset.

getDoubleback to summary
public final double getDouble(long offset)

Implements abstract jnr.ffi.Pointer.getDouble.

Doc from jnr.ffi.Pointer.getDouble.

Reads a double (64 bit) value at the given offset.

Parameters
offset:long

The offset from the start of the memory this Pointer represents at which the value will be read.

Returns:double

the double value at the offset.

getFloatback to summary
public final float getFloat(long offset)

Implements abstract jnr.ffi.Pointer.getFloat.

Doc from jnr.ffi.Pointer.getFloat.

Reads a float (32 bit) value at the given offset.

Parameters
offset:long

The offset from the start of the memory this Pointer represents at which the value will be read.

Returns:float

the float value at the offset.

getIntback to summary
public final int getInt(long offset)

Implements abstract jnr.ffi.Pointer.getInt.

Doc from jnr.ffi.Pointer.getInt.

Reads an int (32 bit) value at the given offset.

Parameters
offset:long

The offset from the start of the memory this Pointer represents at which the value will be read.

Returns:int

the int value contained in the memory at the offset.

getLongLongback to summary
public final long getLongLong(long offset)

Implements abstract jnr.ffi.Pointer.getLongLong.

Doc from jnr.ffi.Pointer.getLongLong.

Reads a long (64 bit) value at the given offset.

Parameters
offset:long

The offset from the start of the memory this Pointer represents at which the value will be read.

Returns:long

the long value at the offset.

getPointerback to summary
public Pointer getPointer(long offset)

Implements abstract jnr.ffi.Pointer.getPointer.

Doc from jnr.ffi.Pointer.getPointer.

Reads an Pointer value at the given offset.

Parameters
offset:long

the offset from the start of the memory this Pointer represents at which the value will be read.

Returns:Pointer

the Pointer value read from memory.

getPointerback to summary
public Pointer getPointer(long offset, long size)

Implements abstract jnr.ffi.Pointer.getPointer.

Doc from jnr.ffi.Pointer.getPointer.

Reads an Pointer value at the given offset.

Parameters
offset:long

the offset from the start of the memory this Pointer represents at which the value will be read.

size:long

the maximum size of the memory location the returned Pointer represents.

Returns:Pointer

the Pointer value read from memory.

getShortback to summary
public final short getShort(long offset)

Implements abstract jnr.ffi.Pointer.getShort.

Doc from jnr.ffi.Pointer.getShort.

Reads a short (16 bit) value at the given offset.

Parameters
offset:long

The offset from the start of the memory this Pointer represents at which the value will be read.

Returns:short

the short value at the offset.

getStringback to summary
public String getString(long offset)

Implements abstract jnr.ffi.Pointer.getString.

Doc from jnr.ffi.Pointer.getString.

Reads an String value at the given offset.

Parameters
offset:long

the offset from the start of the memory this Pointer represents at which the value will be read.

Returns:String

the String value read from memory.

getStringback to summary
public String getString(long offset, int maxLength, Charset cs)

Implements abstract jnr.ffi.Pointer.getString.

Doc from jnr.ffi.Pointer.getString.

Reads a String value at the given offset, using a specific Charset

Parameters
offset:long

the offset from the start of the memory this Pointer represents at which the value will be read.

maxLength:int

the maximum size of memory to search for a NUL byte.

cs:Charset

the Charset to use to decode the string.

Returns:String

the String value read from memory.

hasArrayback to summary
public boolean hasArray()

Implements abstract jnr.ffi.Pointer.hasArray.

Doc from jnr.ffi.Pointer.hasArray.

Indicates whether this Pointer instance is backed by an array.

Returns:boolean

true if, and only if, this memory object is backed by an array

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
indexOfback to summary
public int indexOf(long offset, byte value, int maxlen)

Implements abstract jnr.ffi.Pointer.indexOf.

Doc from jnr.ffi.Pointer.indexOf.

Returns the location of a byte value within the memory area represented by this Pointer.

Parameters
offset:long

the offset from the start of the memory location this Pointer represents to begin searching.

value:byte

the byte value to locate.

maxlen:int

the maximum number of bytes to search for the desired value.

Returns:int

the offset from the start of the search area (i.e. relative to the offset parameter), or -1 if not found.

memcpyback to summary
private static void memcpy(DirectMemoryIO src, long srcOffset, DirectMemoryIO dst, long dstOffset, long count)
putback to summary
public final void put(long offset, byte[] src, int off, int len)

Implements abstract jnr.ffi.Pointer.put.

Doc from jnr.ffi.Pointer.put.

Bulk put method for multiple byte values. This method writes multiple byte values to consecutive addresses, beginning at the given offset, from an array.

Parameters
offset:long

the offset from the start of the memory this Pointer represents at which the first value will be written.

src:byte[]

the array to get values from.

off:int

the start index in the dst array to begin reading values.

len:int

the number of values to be written.

putback to summary
public final void put(long offset, short[] src, int off, int len)

Implements abstract jnr.ffi.Pointer.put.

Doc from jnr.ffi.Pointer.put.

Bulk put method for multiple short values. This method writes multiple short values to consecutive addresses, beginning at the given offset, from an array.

Parameters
offset:long

the offset from the start of the memory this Pointer represents at which the first value will be written.

src:short[]

the array to get values from.

off:int

the start index in the dst array to begin reading values.

len:int

the number of values to be written.

putback to summary
public final void put(long offset, int[] src, int off, int len)

Implements abstract jnr.ffi.Pointer.put.

Doc from jnr.ffi.Pointer.put.

Bulk put method for multiple int values. This method writes multiple int values to consecutive addresses, beginning at the given offset, from an array.

Parameters
offset:long

the offset from the start of the memory this Pointer represents at which the first value will be written.

src:int[]

the array to get values from.

off:int

the start index in the dst array to begin reading values.

len:int

the number of values to be written.

putback to summary
public final void put(long offset, long[] src, int off, int len)

Implements abstract jnr.ffi.Pointer.put.

Doc from jnr.ffi.Pointer.put.

Bulk put method for multiple long values. This method writes multiple long values to consecutive addresses, beginning at the given offset, from an array.

Parameters
offset:long

the offset from the start of the memory this Pointer represents at which the first value will be written.

src:long[]

the array to get values from.

off:int

the start index in the dst array to begin reading values.

len:int

the number of values to be written.

putback to summary
public final void put(long offset, float[] src, int off, int len)

Implements abstract jnr.ffi.Pointer.put.

Doc from jnr.ffi.Pointer.put.

Bulk put method for multiple float values. This method writes multiple float values to consecutive addresses, beginning at the given offset, from an array.

Parameters
offset:long

the offset from the start of the memory this Pointer represents at which the first value will be written.

src:float[]

the array to get values from.

off:int

the start index in the dst array to begin reading values.

len:int

the number of values to be written.

putback to summary
public final void put(long offset, double[] src, int off, int len)

Implements abstract jnr.ffi.Pointer.put.

Doc from jnr.ffi.Pointer.put.

Bulk put method for multiple double values. This method writes multiple double values to consecutive addresses, beginning at the given offset, from an array.

Parameters
offset:long

the offset from the start of the memory this Pointer represents at which the first value will be written.

src:double[]

the array to get values from.

off:int

the start index in the dst array to begin reading values.

len:int

the number of values to be written.

putByteback to summary
public final void putByte(long offset, byte value)

Implements abstract jnr.ffi.Pointer.putByte.

Doc from jnr.ffi.Pointer.putByte.

Writes a byte (8 bit) value at the given offset.

Parameters
offset:long

The offset from the start of the memory this Pointer represents at which the value will be written.

value:byte

the byte value to be written.

putDoubleback to summary
public final void putDouble(long offset, double value)

Implements abstract jnr.ffi.Pointer.putDouble.

Doc from jnr.ffi.Pointer.putDouble.

Writes a double (64 bit, double precision) value at the given offset.

Parameters
offset:long

The offset from the start of the memory this Pointer represents at which the value will be written.

value:double

the double value to be written.

putFloatback to summary
public final void putFloat(long offset, float value)

Implements abstract jnr.ffi.Pointer.putFloat.

Doc from jnr.ffi.Pointer.putFloat.

Writes a float (32 bit, single precision) value at the given offset.

Parameters
offset:long

The offset from the start of the memory this Pointer represents at which the value will be written.

value:float

the float value to be written.

putIntback to summary
public final void putInt(long offset, int value)

Implements abstract jnr.ffi.Pointer.putInt.

Doc from jnr.ffi.Pointer.putInt.

Writes an int (32 bit) value at the given offset.

Parameters
offset:long

The offset from the start of the memory this Pointer represents at which the value will be written.

value:int

the int value to be written.

putLongLongback to summary
public final void putLongLong(long offset, long value)

Implements abstract jnr.ffi.Pointer.putLongLong.

Doc from jnr.ffi.Pointer.putLongLong.

Writes a long (64 bit) value at the given offset.

Parameters
offset:long

The offset from the start of the memory this Pointer represents at which the value will be written.

value:long

the long value to be written.

putPointerback to summary
public void putPointer(long offset, Pointer value)

Implements abstract jnr.ffi.Pointer.putPointer.

Doc from jnr.ffi.Pointer.putPointer.

Writes a Pointer value at the given offset.

Parameters
offset:long

The offset from the start of the memory this Pointer represents at which the value will be written.

value:Pointer

the Pointer value to be written to memory.

putShortback to summary
public final void putShort(long offset, short value)

Implements abstract jnr.ffi.Pointer.putShort.

Doc from jnr.ffi.Pointer.putShort.

Writes a short (16 bit) value at the given offset.

Parameters
offset:long

The offset from the start of the memory this Pointer represents at which the value will be written.

value:short

the short value to be written.

putStringback to summary
public void putString(long offset, String string, int maxLength, Charset cs)

Implements abstract jnr.ffi.Pointer.putString.

Doc from jnr.ffi.Pointer.putString.

Writes a String value at the given offset, using a specific Charset

Parameters
offset:long

the offset from the start of the memory this Pointer represents at which the value will be written.

string:String

the string to be written.

maxLength:int

the maximum size of memory to use to store the string.

cs:Charset

the Charset to use to decode the string.

putZeroTerminatedByteArrayback to summary
public void putZeroTerminatedByteArray(long offset, byte[] src, int off, int len)
setMemoryback to summary
public final void setMemory(long offset, long size, byte value)

Implements abstract jnr.ffi.Pointer.setMemory.

Doc from jnr.ffi.Pointer.setMemory.

Sets the value of each byte in the memory area represented by this Pointer. to a specified value.

Parameters
offset:long

the offset from the start of the memory location this Pointer represents to begin writing to.

size:long

the number of bytes to set to the value.

value:byte

the value to set each byte to.

sizeback to summary
public long size()

Implements abstract jnr.ffi.Pointer.size.

Doc from jnr.ffi.Pointer.size.

Gets the size of this memory object in bytes (optional operation).

Returns:long

the size of the memory area this Pointer points to. If the size is unknown, java.lang.Long#MAX_VALUE is returned}.

transferFromback to summary
public void transferFrom(long offset, Pointer other, long otherOffset, long count)

Overrides jnr.ffi.provider.AbstractMemoryIO.transferFrom.

Doc from jnr.ffi.Pointer.transferFrom.

Bulk data transfer from one memory location to another.

Parameters
offset:long

the offset from the start of the memory location this Pointer represents to begin copying to.

other:Pointer

the destination memory location to transfer data from.

otherOffset:long

the offset from the start of the memory location the destination Pointer represents to begin copying from.

count:long

the number of bytes to transfer.

Annotations
@Override
transferToback to summary
public void transferTo(long offset, Pointer other, long otherOffset, long count)

Overrides jnr.ffi.provider.AbstractMemoryIO.transferTo.

Doc from jnr.ffi.Pointer.transferTo.

Bulk data transfer from one memory location to another.

Parameters
offset:long

the offset from the start of the memory location this Pointer represents to begin copying from.

other:Pointer

the destination memory location to transfer data to.

otherOffset:long

the offset from the start of the memory location the destination Pointer represents to begin copying to.

count:long

the number of bytes to transfer.

Annotations
@Override