|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjnr.ffi.Pointer
jnr.ffi.provider.AbstractMemoryIO
jnr.ffi.provider.InAccessibleMemoryIO
jnr.ffi.provider.NullMemoryIO
public final class NullMemoryIO
| Constructor Summary | |
|---|---|
NullMemoryIO(Runtime runtime)
|
|
| Method Summary | |
|---|---|
long |
address()
Gets the native address of this memory object (optional operation). |
protected NullPointerException |
error()
|
boolean |
isDirect()
Indicates whether or not this memory object represents a native memory address. |
long |
size()
Gets the size of this memory object (optional operation). |
| Methods inherited from class jnr.ffi.provider.InAccessibleMemoryIO |
|---|
array, arrayLength, arrayOffset, get, get, get, get, get, get, getByte, getDouble, getFloat, getInt, getLong, getLongLong, getPointer, getPointer, getShort, getString, getString, hasArray, indexOf, put, put, put, put, put, put, putByte, putDouble, putFloat, putInt, putLong, putLongLong, putPointer, putShort, putString, setMemory |
| Methods inherited from class jnr.ffi.provider.AbstractMemoryIO |
|---|
checkBounds, checkBounds, getAddress, getInt, getNativeLong, getRuntime, indexOf, putAddress, putAddress, putInt, putNativeLong, slice, slice, transferFrom, transferTo |
| Methods inherited from class jnr.ffi.Pointer |
|---|
get, getNullTerminatedPointerArray, getNullTerminatedStringArray, newIntPointer, put, wrap, wrap, wrap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NullMemoryIO(Runtime runtime)
| Method Detail |
|---|
protected final NullPointerException error()
error in class InAccessibleMemoryIOpublic final boolean isDirect()
PointerMemory objects can be either direct (representing native memory), or non-direct (representing java heap memory).
Non-direct memory objects can still be passed to native functions as pointer (void *, char *, etc) parameters, but the java memory will first be copied to a temporary native memory area. The temporary memory area will then be used as the parameter value for the call. If needed, the java memory will be automatically reloaded from the temporary native memory after the native function returns.
Note: the transient nature of the temporary memory allocated for non-direct memory means native functions which store the address value passed to them will fail in unpredictable ways when using non-direct memory. You will need to explicitly allocate direct memory to use those types of functions.
isDirect in class Pointerpublic long address()
Pointer
address in class Pointerpublic long size()
Pointer
size in class PointerPointer points to. If
the size is unknown, Long.MAX_VALUE is returned}.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||