Class ArrayFlags

java.lang.Object
com.kenai.jffi.ArrayFlags

public final class ArrayFlags extends Object
Flags to use when adding an array as a pointer parameter
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    For OUT arrays, clear the native memory area before passing to the native function
    static final int
    Copy the array contents to native memory before calling the function
    static final int
    Append a NUL byte to the array contents after copying to native memory
    static final int
    After calling the function, reload the array contents from native memory
    static final int
    Pin the array memory and pass the JVM memory pointer directly to the function
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static final boolean
    isIn(int flags)
    Tests if the flags indicate data should be copied to native memory.
    static final boolean
    isOut(int flags)
    Tests if the flags indicate data should be copied from native memory.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • IN

      public static final int IN
      Copy the array contents to native memory before calling the function
      See Also:
    • OUT

      public static final int OUT
      After calling the function, reload the array contents from native memory
      See Also:
    • PINNED

      public static final int PINNED
      Pin the array memory and pass the JVM memory pointer directly to the function
      See Also:
    • NULTERMINATE

      public static final int NULTERMINATE
      Append a NUL byte to the array contents after copying to native memory
      See Also:
    • CLEAR

      public static final int CLEAR
      For 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.