Top Description Fields Constructors Methods
com.kenai.jffi

public final Class ArrayFlags

extends Object
Class Inheritance

Flags to use when adding an array as a pointer parameter

Field Summary

Modifier and TypeField and Description
public static final int
CLEAR

For OUT arrays, clear the native memory area before passing to the native function

public static final int
IN

Copy the array contents to native memory before calling the function

public static final int
NULTERMINATE

Append a NUL byte to the array contents after copying to native memory

public static final int
OUT

After calling the function, reload the array contents from native memory

public static final int
PINNED

Pin the array memory and pass the JVM memory pointer directly to the function

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static final boolean

Returns:

true If array data should be copied to native memory.
isIn
(int
The array flags. Any combination of IN | OUT | PINNED | NULTERMINATE.
flags
)

Tests if the flags indicate data should be copied to native memory.

public static final boolean

Returns:

true If array data should be copied from native memory.
isOut
(int
The array flags. Any combination of IN | OUT | PINNED | NULTERMINATE.
flags
)

Tests if the flags indicate data should be copied from native memory.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CLEARback to summary
public static final int CLEAR

For OUT arrays, clear the native memory area before passing to the native function

INback to summary
public static final int IN

Copy the array contents to native memory before calling the function

NULTERMINATEback to summary
public static final int NULTERMINATE

Append a NUL byte to the array contents after copying to native memory

OUTback to summary
public static final int OUT

After calling the function, reload the array contents from native memory

PINNEDback to summary
public static final int PINNED

Pin the array memory and pass the JVM memory pointer directly to the function

Constructor Detail

ArrayFlagsback to summary
private ArrayFlags()

Method Detail

isInback to summary
public static final boolean isIn(int flags)

Tests if the flags indicate data should be copied to native memory.

Parameters
flags:int

The array flags. Any combination of IN | OUT | PINNED | NULTERMINATE.

Returns:boolean

true If array data should be copied to native memory.

isOutback to summary
public static final boolean isOut(int flags)

Tests if the flags indicate data should be copied from native memory.

Parameters
flags:int

The array flags. Any combination of IN | OUT | PINNED | NULTERMINATE.

Returns:boolean

true If array data should be copied from native memory.