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 int
CLEAR
For OUT arrays, clear the native memory area before passing to the native functionstatic int
IN
Copy the array contents to native memory before calling the functionstatic int
NULTERMINATE
Append a NUL byte to the array contents after copying to native memorystatic int
OUT
After calling the function, reload the array contents from native memorystatic int
PINNED
Pin the array memory and pass the JVM memory pointer directly to the function
-
Constructor Summary
Constructors Modifier Constructor Description private
ArrayFlags()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isIn(int flags)
Tests if the flags indicate data should be copied to native memory.static boolean
isOut(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:
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.
-
-