Class 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 int CLEAR
      For OUT arrays, clear the native memory area before passing to the native function
      static int IN
      Copy the array contents to native memory before calling the function
      static int NULTERMINATE
      Append a NUL byte to the array contents after copying to native memory
      static int OUT
      After calling the function, reload the array contents from native memory
      static int PINNED
      Pin the array memory and pass the JVM memory pointer directly to the function
    • 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.