Package jnr.ffi.provider.jffi
Class ArrayMemoryIO
- java.lang.Object
-
- jnr.ffi.Pointer
-
- jnr.ffi.provider.AbstractMemoryIO
-
- jnr.ffi.provider.AbstractArrayMemoryIO
-
- jnr.ffi.provider.jffi.ArrayMemoryIO
-
public final class ArrayMemoryIO extends AbstractArrayMemoryIO
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jnr.ffi.provider.AbstractArrayMemoryIO
AbstractArrayMemoryIO.ArrayIO
-
-
Field Summary
-
Fields inherited from class jnr.ffi.provider.AbstractArrayMemoryIO
buffer, length, offset
-
-
Constructor Summary
Constructors Constructor Description ArrayMemoryIO(Runtime runtime, byte[] bytes, int off, int len)
ArrayMemoryIO(Runtime runtime, int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Pointer
getPointer(long offset)
Reads anPointer
value at the given offset.Pointer
getPointer(long offset, long size)
Reads anPointer
value at the given offset.void
putPointer(long offset, Pointer value)
Writes aPointer
value at the given offset.-
Methods inherited from class jnr.ffi.provider.AbstractArrayMemoryIO
array, arrayLength, arrayOffset, clear, get, get, get, get, get, get, getAddress, getArrayIO, getByte, getDouble, getFloat, getInt, getLongLong, getShort, getString, getString, hasArray, index, indexOf, indexOf, isNull, length, offset, put, put, put, put, put, put, putAddress, putByte, putDouble, putFloat, putInt, putLongLong, putShort, putString, putZeroTerminatedByteArray, remaining, setMemory, size
-
Methods inherited from class jnr.ffi.provider.AbstractMemoryIO
checkBounds, checkBounds, getInt, getLong, getNativeLong, putAddress, putInt, putLong, putNativeLong, slice, slice, transferFrom, transferTo
-
Methods inherited from class jnr.ffi.Pointer
address, get, getNullTerminatedPointerArray, getNullTerminatedStringArray, getRuntime, isDirect, newIntPointer, put, toString, wrap, wrap, wrap
-
-
-
-
Method Detail
-
getPointer
public Pointer getPointer(long offset)
Description copied from class:Pointer
Reads anPointer
value at the given offset.- Specified by:
getPointer
in classPointer
- Parameters:
offset
- the offset from the start of the memory thisPointer
represents at which the value will be read.- Returns:
- the
Pointer
value read from memory.
-
getPointer
public Pointer getPointer(long offset, long size)
Description copied from class:Pointer
Reads anPointer
value at the given offset.- Specified by:
getPointer
in classPointer
- Parameters:
offset
- the offset from the start of the memory thisPointer
represents at which the value will be read.size
- the maximum size of the memory location the returnedPointer
represents.- Returns:
- the
Pointer
value read from memory.
-
putPointer
public void putPointer(long offset, Pointer value)
Description copied from class:Pointer
Writes aPointer
value at the given offset.- Specified by:
putPointer
in classPointer
- Parameters:
offset
- The offset from the start of the memory thisPointer
represents at which the value will be written.value
- thePointer
value to be written to memory.
-
-