Package com.kenai.jffi
Class ArrayFlags
java.lang.Object
com.kenai.jffi.ArrayFlags
public final class ArrayFlags
extends java.lang.Object
Flags to use when adding an array as a pointer parameter
-
Field Summary
Fields Modifier and Type Field Description static intCLEARFor OUT arrays, clear the native memory area before passing to the native functionstatic intINCopy the array contents to native memory before calling the functionstatic intNULTERMINATEAppend a NUL byte to the array contents after copying to native memorystatic intOUTAfter calling the function, reload the array contents from native memorystatic intPINNEDPin the array memory and pass the JVM memory pointer directly to the function -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
IN
public static final int INCopy the array contents to native memory before calling the function- See Also:
- Constant Field Values
-
OUT
public static final int OUTAfter calling the function, reload the array contents from native memory- See Also:
- Constant Field Values
-
PINNED
public static final int PINNEDPin the array memory and pass the JVM memory pointer directly to the function- See Also:
- Constant Field Values
-
NULTERMINATE
public static final int NULTERMINATEAppend a NUL byte to the array contents after copying to native memory- See Also:
- Constant Field Values
-
CLEAR
public static final int CLEARFor OUT arrays, clear the native memory area before passing to the native function- See Also:
- Constant Field Values
-
-
Method Details
-
isOut
public static final boolean isOut(int flags)Tests if the flags indicate data should be copied from native memory.- Parameters:
flags- The array flags. Any combination of IN | OUT | PINNED | NULTERMINATE.- Returns:
trueIf array data should be copied from native memory.
-
isIn
public static final boolean isIn(int flags)Tests if the flags indicate data should be copied to native memory.- Parameters:
flags- The array flags. Any combination of IN | OUT | PINNED | NULTERMINATE.- Returns:
trueIf array data should be copied to native memory.
-