Package com.kenai.jffi
Class ArrayFlags
- java.lang.Object
-
- com.kenai.jffi.ArrayFlags
-
public final class ArrayFlags extends java.lang.ObjectFlags 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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisIn(int flags)Tests if the flags indicate data should be copied to native memory.static booleanisOut(int flags)Tests if the flags indicate data should be copied from native memory.
-
-
-
Field Detail
-
IN
public static final int IN
Copy the array contents to native memory before calling the function- See Also:
- Constant Field Values
-
OUT
public static final int OUT
After calling the function, reload the array contents from native memory- See Also:
- Constant Field Values
-
PINNED
public static final int PINNED
Pin the array memory and pass the JVM memory pointer directly to the function- See Also:
- Constant Field Values
-
NULTERMINATE
public static final int NULTERMINATE
Append a NUL byte to the array contents after copying to native memory- See Also:
- Constant Field Values
-
CLEAR
public static final int CLEAR
For OUT arrays, clear the native memory area before passing to the native function- See Also:
- Constant Field Values
-
-
Method Detail
-
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.
-
-