Class spng_iccp

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class spng_iccp extends Struct<spng_iccp> implements NativeResource

 struct spng_iccp {
     char profile_name[80];
     size_t profile_len;
     char * profile;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • PROFILE_NAME

      public static final int PROFILE_NAME
      The struct member offsets.
    • PROFILE_LEN

      public static final int PROFILE_LEN
      The struct member offsets.
    • PROFILE

      public static final int PROFILE
      The struct member offsets.
  • Constructor Details

    • spng_iccp

      public spng_iccp(ByteBuffer container)
      Creates a spng_iccp 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 Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<spng_iccp>
    • profile_name

      public ByteBuffer profile_name()
      Returns:
      a ByteBuffer view of the profile_name field.
    • profile_nameString

      public String profile_nameString()
      Returns:
      the null-terminated string stored in the profile_name field.
    • profile_len

      public long profile_len()
      Returns:
      the value of the profile_len field.
    • profile

      public ByteBuffer profile()
      Returns:
      a ByteBuffer view of the data pointed to by the profile field.
    • profile_name

      public spng_iccp profile_name(ByteBuffer value)
      Copies the specified encoded string to the profile_name field.
    • profile

      public spng_iccp profile(ByteBuffer value)
      Sets the address of the specified ByteBuffer to the profile field.
    • set

      public spng_iccp set(ByteBuffer profile_name, ByteBuffer profile)
      Initializes this struct with the specified values.
    • set

      public spng_iccp set(spng_iccp src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static spng_iccp malloc()
      Returns a new spng_iccp instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static spng_iccp calloc()
      Returns a new spng_iccp instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static spng_iccp create()
      Returns a new spng_iccp instance allocated with BufferUtils.
    • create

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

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

      public static spng_iccp.Buffer malloc(int capacity)
      Returns a new spng_iccp.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static spng_iccp.Buffer calloc(int capacity)
      Returns a new spng_iccp.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static spng_iccp.Buffer create(int capacity)
      Returns a new spng_iccp.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

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

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

      public static spng_iccp malloc(MemoryStack stack)
      Returns a new spng_iccp instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

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

      public static spng_iccp.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new spng_iccp.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

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

      public static ByteBuffer nprofile_name(long struct)
      Unsafe version of profile_name().
    • nprofile_nameString

      public static String nprofile_nameString(long struct)
      Unsafe version of profile_nameString().
    • nprofile_len

      public static long nprofile_len(long struct)
      Unsafe version of profile_len().
    • nprofile

      public static ByteBuffer nprofile(long struct)
      Unsafe version of profile.
    • nprofile_name

      public static void nprofile_name(long struct, ByteBuffer value)
      Unsafe version of profile_name.
    • nprofile_len

      public static void nprofile_len(long struct, long value)
      Sets the specified value to the profile_len field of the specified struct.
    • nprofile

      public static void nprofile(long struct, ByteBuffer value)
      Unsafe version of profile.
    • validate

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