Package com.kenai.jffi
Class ArrayFlags
java.lang.Object
com.kenai.jffi.ArrayFlags
Flags to use when adding an array as a pointer parameter
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intFor OUT arrays, clear the native memory area before passing to the native functionstatic final intCopy the array contents to native memory before calling the functionstatic final intAppend a NUL byte to the array contents after copying to native memorystatic final intAfter calling the function, reload the array contents from native memorystatic final intPin the array memory and pass the JVM memory pointer directly to the function -
Method Summary
-
Field Details
-
IN
public static final int INCopy the array contents to native memory before calling the function- See Also:
-
OUT
public static final int OUTAfter calling the function, reload the array contents from native memory- See Also:
-
PINNED
public static final int PINNEDPin the array memory and pass the JVM memory pointer directly to the function- See Also:
-
NULTERMINATE
public static final int NULTERMINATEAppend a NUL byte to the array contents after copying to native memory- See Also:
-
CLEAR
public static final int CLEARFor OUT arrays, clear the native memory area before passing to the native function- See Also:
-
-
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.
-