Class spng_text.Buffer

All Implemented Interfaces:
AutoCloseable, Iterable<spng_text>, NativeResource, Pointer
Enclosing class:
spng_text

public static class spng_text.Buffer extends StructBuffer<spng_text, spng_text.Buffer> implements NativeResource
An array of spng_text structs.
  • Constructor Details

    • Buffer

      public Buffer(ByteBuffer container)
      Creates a new spng_text.Buffer instance backed by the specified container.

      Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by spng_text.SIZEOF, and its mark will be undefined.

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

    • Buffer

      public Buffer(long address, int cap)
  • Method Details

    • keyword

      @NativeType("char[80]") public ByteBuffer keyword()
      Returns:
      a ByteBuffer view of the keyword field.
    • keywordString

      @NativeType("char[80]") public String keywordString()
      Returns:
      the null-terminated string stored in the keyword field.
    • type

      public int type()
      Returns:
      the value of the type field.
    • length

      @NativeType("size_t") public long length()
      Returns:
      the value of the length field.
    • text

      @NativeType("char *") public ByteBuffer text()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the text field.
    • textString

      @NativeType("char *") public String textString()
      Returns:
      the null-terminated string pointed to by the text field.
    • compression_flag

      @NativeType("uint8_t") public byte compression_flag()
      Returns:
      the value of the compression_flag field.
    • compression_method

      @NativeType("uint8_t") public byte compression_method()
      Returns:
      the value of the compression_method field.
    • language_tag

      @NativeType("char *") public ByteBuffer language_tag()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the language_tag field.
    • language_tagString

      @NativeType("char *") public String language_tagString()
      Returns:
      the null-terminated string pointed to by the language_tag field.
    • translated_keyword

      @NativeType("char *") public ByteBuffer translated_keyword()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the translated_keyword field.
    • translated_keywordString

      @NativeType("char *") public String translated_keywordString()
      Returns:
      the null-terminated string pointed to by the translated_keyword field.
    • keyword

      public spng_text.Buffer keyword(@NativeType("char[80]") ByteBuffer value)
      Copies the specified encoded string to the keyword field.
    • type

      public spng_text.Buffer type(int value)
      Sets the specified value to the type field.
    • text

      public spng_text.Buffer text(@NativeType("char *") ByteBuffer value)
      Sets the address of the specified encoded string to the text field.
    • compression_flag

      public spng_text.Buffer compression_flag(@NativeType("uint8_t") byte value)
      Sets the specified value to the compression_flag field.
    • compression_method

      public spng_text.Buffer compression_method(@NativeType("uint8_t") byte value)
      Sets the specified value to the compression_method field.
    • language_tag

      public spng_text.Buffer language_tag(@NativeType("char *") ByteBuffer value)
      Sets the address of the specified encoded string to the language_tag field.
    • translated_keyword

      public spng_text.Buffer translated_keyword(@NativeType("char *") ByteBuffer value)
      Sets the address of the specified encoded string to the translated_keyword field.