Class EXRAttribute

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

    public class EXRAttribute
    extends Struct
    implements NativeResource

    Layout

    
     struct EXRAttribute {
         char name[256];
         char type[256];
         unsigned char * value;
         int size;
         char[4];
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • NAME, TYPE, VALUE, SIZE

        The struct member offsets.
    • Constructor Detail

      • EXRAttribute

        public EXRAttribute​(java.nio.ByteBuffer container)
        Creates a EXRAttribute 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
      • name

        public java.nio.ByteBuffer name()
        Returns a ByteBuffer view of the name field.
      • nameString

        public java.lang.String nameString()
        Decodes the null-terminated string stored in the name field.
      • type

        public java.nio.ByteBuffer type()
        Returns a ByteBuffer view of the type field.
      • typeString

        public java.lang.String typeString()
        Decodes the null-terminated string stored in the type field.
      • value

        @Nullable
        public java.nio.ByteBuffer value()
        Returns a ByteBuffer view of the data pointed to by the value field.
      • size

        public int size()
        Returns the value of the size field.
      • name

        public EXRAttribute name​(java.nio.ByteBuffer value)
        Copies the specified encoded string to the name field.
      • type

        public EXRAttribute type​(java.nio.ByteBuffer value)
        Copies the specified encoded string to the type field.
      • value

        public EXRAttribute value​(@Nullable
                                  java.nio.ByteBuffer value)
        Sets the address of the specified ByteBuffer to the value field.
      • set

        public EXRAttribute set​(java.nio.ByteBuffer name,
                                java.nio.ByteBuffer type,
                                @Nullable
                                java.nio.ByteBuffer value)
        Initializes this struct with the specified values.
      • set

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

        public static EXRAttribute create​(long address)
        Returns a new EXRAttribute instance for the specified memory address.
      • createSafe

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

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

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

        public static EXRAttribute callocStack​(MemoryStack stack)
        Returns a new EXRAttribute instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static EXRAttribute.Buffer callocStack​(int capacity)
        Returns a new EXRAttribute.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • callocStack

        public static EXRAttribute.Buffer callocStack​(int capacity,
                                                      MemoryStack stack)
        Returns a new EXRAttribute.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • nname

        public static java.nio.ByteBuffer nname​(long struct)
        Unsafe version of name().
      • nnameString

        public static java.lang.String nnameString​(long struct)
        Unsafe version of nameString().
      • ntype

        public static java.nio.ByteBuffer ntype​(long struct)
        Unsafe version of type().
      • ntypeString

        public static java.lang.String ntypeString​(long struct)
        Unsafe version of typeString().
      • nvalue

        @Nullable
        public static java.nio.ByteBuffer nvalue​(long struct)
        Unsafe version of value.
      • nsize

        public static int nsize​(long struct)
        Unsafe version of size().
      • nname

        public static void nname​(long struct,
                                 java.nio.ByteBuffer value)
        Unsafe version of name.
      • ntype

        public static void ntype​(long struct,
                                 java.nio.ByteBuffer value)
        Unsafe version of type.
      • nvalue

        public static void nvalue​(long struct,
                                  @Nullable
                                  java.nio.ByteBuffer value)
        Unsafe version of value.
      • nsize

        public static void nsize​(long struct,
                                 int value)
        Sets the specified value to the size field of the specified struct.
      • 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