Class AppOverrideKeys

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class AppOverrideKeys
    extends Struct
    implements NativeResource

    Layout

    
     struct AppOverrideKeys_t {
         char * pchKey;
         char * pchValue;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • PCHKEY, PCHVALUE

        The struct member offsets.
    • Constructor Detail

      • AppOverrideKeys

        public AppOverrideKeys​(java.nio.ByteBuffer container)
        Creates a AppOverrideKeys instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • pchKey

        public java.nio.ByteBuffer pchKey()
        Returns a ByteBuffer view of the null-terminated string pointed to by the pchKey field.
      • pchKeyString

        public java.lang.String pchKeyString()
        Decodes the null-terminated string pointed to by the pchKey field.
      • pchValue

        public java.nio.ByteBuffer pchValue​(int capacity)
        Returns a ByteBuffer view of the data pointed to by the pchValue field.
        Parameters:
        capacity - the number of elements in the returned buffer
      • pchKey

        public AppOverrideKeys pchKey​(java.nio.ByteBuffer value)
        Sets the address of the specified encoded string to the pchKey field.
      • pchValue

        public AppOverrideKeys pchValue​(java.nio.ByteBuffer value)
        Sets the address of the specified ByteBuffer to the pchValue field.
      • set

        public AppOverrideKeys set​(java.nio.ByteBuffer pchKey,
                                   java.nio.ByteBuffer pchValue)
        Initializes this struct with the specified values.
      • set

        public AppOverrideKeys set​(AppOverrideKeys src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • createSafe

        @Nullable
        public static AppOverrideKeys createSafe​(long address)
        Like create, but returns null if address is NULL.
      • create

        public static AppOverrideKeys.Buffer create​(long address,
                                                    int capacity)
        Create a AppOverrideKeys.Buffer instance at the specified memory.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        @Nullable
        public static AppOverrideKeys.Buffer createSafe​(long address,
                                                        int capacity)
        Like create, but returns null if address is NULL.
      • npchKey

        public static java.nio.ByteBuffer npchKey​(long struct)
        Unsafe version of pchKey().
      • npchKeyString

        public static java.lang.String npchKeyString​(long struct)
        Unsafe version of pchKeyString().
      • npchValue

        public static java.nio.ByteBuffer npchValue​(long struct,
                                                    int capacity)
        Unsafe version of pchValue.
      • npchKey

        public static void npchKey​(long struct,
                                   java.nio.ByteBuffer value)
        Unsafe version of pchKey.
      • npchValue

        public static void npchValue​(long struct,
                                     java.nio.ByteBuffer value)
        Unsafe version of pchValue.
      • validate

        public static void validate​(long struct)
        Validates pointer members that should not be NULL.
        Parameters:
        struct - the struct to validate
      • validate

        public static void validate​(long array,
                                    int count)
        Calls validate(long) for each struct contained in the specified struct array.
        Parameters:
        array - the struct array to validate
        count - the number of structs in array