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

      public ByteBuffer keyword()
      Returns:
      a ByteBuffer view of the keyword field.
    • keywordString

      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

      public long length()
      Returns:
      the value of the length field.
    • text

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

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

      public byte compression_flag()
      Returns:
      the value of the compression_flag field.
    • compression_method

      public byte compression_method()
      Returns:
      the value of the compression_method field.
    • language_tag

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

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

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

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

      public spng_text.Buffer keyword(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(ByteBuffer value)
      Sets the address of the specified encoded string to the text field.
    • compression_flag

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

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

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

      public spng_text.Buffer translated_keyword(ByteBuffer value)
      Sets the address of the specified encoded string to the translated_keyword field.