Class ktxStream.Buffer

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

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

    • Buffer

      public Buffer(ByteBuffer container)
      Creates a new ktxStream.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 ktxStream.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

    • read

      public ktxStream_read read()
      Returns:
      the value of the read field.
    • skip

      public ktxStream_skip skip()
      Returns:
      the value of the skip field.
    • write

      public ktxStream_write write()
      Returns:
      the value of the write field.
    • getpos

      public ktxStream_getpos getpos()
      Returns:
      the value of the getpos field.
    • setpos

      public ktxStream_setpos setpos()
      Returns:
      the value of the setpos field.
    • getsize

      public ktxStream_getsize getsize()
      Returns:
      the value of the getsize field.
    • destruct

      public ktxStream_destruct destruct()
      Returns:
      the value of the destruct field.
    • type

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

      public long data_file()
      Returns:
      the value of the data.file field.
    • data_mem

      public long data_mem()
      Returns:
      the value of the data.mem field.
    • data_custom_ptr_address

      public ByteBuffer data_custom_ptr_address(int capacity)
      Returns:
      a ByteBuffer view of the data pointed to by the data.custom_ptr.address field.
    • data_custom_ptr_allocatorAddress

      public long data_custom_ptr_allocatorAddress()
      Returns:
      the value of the data.custom_ptr.allocatorAddress field.
    • data_custom_ptr_size

      public long data_custom_ptr_size()
      Returns:
      the value of the data.custom_ptr.size field.
    • readpos

      public long readpos()
      Returns:
      the value of the readpos field.
    • closeOnDestruct

      public boolean closeOnDestruct()
      Returns:
      the value of the closeOnDestruct field.
    • read

      public ktxStream.Buffer read(ktxStream_readI value)
      Sets the specified value to the read field.
    • skip

      public ktxStream.Buffer skip(ktxStream_skipI value)
      Sets the specified value to the skip field.
    • write

      public ktxStream.Buffer write(ktxStream_writeI value)
      Sets the specified value to the write field.
    • getpos

      public ktxStream.Buffer getpos(ktxStream_getposI value)
      Sets the specified value to the getpos field.
    • setpos

      public ktxStream.Buffer setpos(ktxStream_setposI value)
      Sets the specified value to the setpos field.
    • getsize

      public ktxStream.Buffer getsize(ktxStream_getsizeI value)
      Sets the specified value to the getsize field.
    • destruct

      public ktxStream.Buffer destruct(ktxStream_destructI value)
      Sets the specified value to the destruct field.
    • type

      public ktxStream.Buffer type(int value)
      Sets the specified value to the type field.
    • data_file

      public ktxStream.Buffer data_file(long value)
      Sets the specified value to the file field.
    • data_mem

      public ktxStream.Buffer data_mem(long value)
      Sets the specified value to the mem field.
    • data_custom_ptr_address

      public ktxStream.Buffer data_custom_ptr_address(ByteBuffer value)
      Sets the address of the specified ByteBuffer to the address field.
    • data_custom_ptr_allocatorAddress

      public ktxStream.Buffer data_custom_ptr_allocatorAddress(long value)
      Sets the specified value to the allocatorAddress field.
    • data_custom_ptr_size

      public ktxStream.Buffer data_custom_ptr_size(long value)
      Sets the specified value to the size field.
    • readpos

      public ktxStream.Buffer readpos(long value)
      Sets the specified value to the readpos field.
    • closeOnDestruct

      public ktxStream.Buffer closeOnDestruct(boolean value)
      Sets the specified value to the closeOnDestruct field.