Package org.lwjgl.util.ktx
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.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionBuffer(long address, int cap) Buffer(ByteBuffer container) Creates a newktxStream.Bufferinstance backed by the specified container. -
Method Summary
Modifier and TypeMethodDescriptionbooleancloseOnDestruct(boolean value) Sets the specified value to thecloseOnDestructfield.data_custom_ptr_address(int capacity) Sets the address of the specifiedByteBufferto theaddressfield.longdata_custom_ptr_allocatorAddress(long value) Sets the specified value to theallocatorAddressfield.longdata_custom_ptr_size(long value) Sets the specified value to thesizefield.longdata_file(long value) Sets the specified value to thefilefield.longdata_mem()data_mem(long value) Sets the specified value to thememfield.destruct()destruct(ktxStream_destructI value) Sets the specified value to thedestructfield.getpos()getpos(ktxStream_getposI value) Sets the specified value to thegetposfield.getsize()getsize(ktxStream_getsizeI value) Sets the specified value to thegetsizefield.read()read(ktxStream_readI value) Sets the specified value to thereadfield.longreadpos()readpos(long value) Sets the specified value to thereadposfield.setpos()setpos(ktxStream_setposI value) Sets the specified value to thesetposfield.skip()skip(ktxStream_skipI value) Sets the specified value to theskipfield.inttype()type(int value) Sets the specified value to thetypefield.write()write(ktxStream_writeI value) Sets the specified value to thewritefield.Methods inherited from class org.lwjgl.system.StructBuffer
apply, apply, forEach, get, get, get, get, iterator, parallelStream, put, put, sizeof, spliterator, streamMethods inherited from class org.lwjgl.system.CustomBuffer
address, address, address0, capacity, clear, compact, duplicate, flip, free, hasRemaining, limit, limit, mark, position, position, put, remaining, reset, rewind, slice, slice, toStringMethods inherited from class org.lwjgl.system.Pointer.Default
equals, hashCodeMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Constructor Details
-
Buffer
Creates a newktxStream.Bufferinstance 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
- Returns:
- the value of the
readfield.
-
skip
- Returns:
- the value of the
skipfield.
-
write
- Returns:
- the value of the
writefield.
-
getpos
- Returns:
- the value of the
getposfield.
-
setpos
- Returns:
- the value of the
setposfield.
-
getsize
- Returns:
- the value of the
getsizefield.
-
destruct
- Returns:
- the value of the
destructfield.
-
type
public int type()- Returns:
- the value of the
typefield.
-
data_file
public long data_file()- Returns:
- the value of the
data.filefield.
-
data_mem
public long data_mem()- Returns:
- the value of the
data.memfield.
-
data_custom_ptr_address
- Returns:
- a
ByteBufferview of the data pointed to by thedata.custom_ptr.addressfield.
-
data_custom_ptr_allocatorAddress
public long data_custom_ptr_allocatorAddress()- Returns:
- the value of the
data.custom_ptr.allocatorAddressfield.
-
data_custom_ptr_size
public long data_custom_ptr_size()- Returns:
- the value of the
data.custom_ptr.sizefield.
-
readpos
public long readpos()- Returns:
- the value of the
readposfield.
-
closeOnDestruct
public boolean closeOnDestruct()- Returns:
- the value of the
closeOnDestructfield.
-
read
Sets the specified value to thereadfield. -
skip
Sets the specified value to theskipfield. -
write
Sets the specified value to thewritefield. -
getpos
Sets the specified value to thegetposfield. -
setpos
Sets the specified value to thesetposfield. -
getsize
Sets the specified value to thegetsizefield. -
destruct
Sets the specified value to thedestructfield. -
type
Sets the specified value to thetypefield. -
data_file
Sets the specified value to thefilefield. -
data_mem
Sets the specified value to thememfield. -
data_custom_ptr_address
Sets the address of the specifiedByteBufferto theaddressfield. -
data_custom_ptr_allocatorAddress
Sets the specified value to theallocatorAddressfield. -
data_custom_ptr_size
Sets the specified value to thesizefield. -
readpos
Sets the specified value to thereadposfield. -
closeOnDestruct
Sets the specified value to thecloseOnDestructfield.
-