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 int
For OUT arrays, clear the native memory area before passing to the native functionstatic final int
Copy the array contents to native memory before calling the functionstatic final int
Append a NUL byte to the array contents after copying to native memorystatic final int
After calling the function, reload the array contents from native memorystatic final int
Pin the array memory and pass the JVM memory pointer directly to the function -
Constructor Summary
Constructors -
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:
-
-
Constructor Details
-
ArrayFlags
private ArrayFlags()
-
-
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:
true
If 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:
true
If array data should be copied to native memory.
-