Package org.gnome.gio
Class InputVector
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gio.InputVector
- All Implemented Interfaces:
Proxy
Structure used for scatter/gather data input.
You generally pass in an array of
GInputVectors
and the operation will store the read data starting in the
first buffer, switching to the next as needed.- Since:
- 2.22
-
Constructor Summary
ConstructorsConstructorDescriptionAllocate a new InputVector.InputVector(Arena arena) Allocate a new InputVector.InputVector(MemorySegment address) Create a InputVector proxy instance for the provided memory address.InputVector(MemorySegment buffer, long size) Allocate a new InputVector with the fields set to the provided values.InputVector(MemorySegment buffer, long size, Arena arena) Allocate a new InputVector with the fields set to the provided values. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayoutThe memory layout of the native struct.Read the value of the fieldbuffer.longreadSize()Read the value of the fieldsize.voidwriteBuffer(MemorySegment buffer) Write a value in the fieldbuffer.voidwriteSize(long size) Write a value in the fieldsize.Methods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
InputVector
Create a InputVector proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
InputVector
Allocate a new InputVector.- Parameters:
arena- to control the memory allocation scope
-
InputVector
public InputVector()Allocate a new InputVector. The memory is allocated withArena.ofAuto(). -
InputVector
Allocate a new InputVector with the fields set to the provided values.- Parameters:
buffer- value for the fieldbuffersize- value for the fieldsizearena- to control the memory allocation scope
-
InputVector
Allocate a new InputVector with the fields set to the provided values. The memory is allocated withArena.ofAuto().- Parameters:
buffer- value for the fieldbuffersize- value for the fieldsize
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readBuffer
Read the value of the fieldbuffer.- Returns:
- The value of the field
buffer
-
writeBuffer
Write a value in the fieldbuffer.- Parameters:
buffer- The new value for the fieldbuffer
-
readSize
public long readSize()Read the value of the fieldsize.- Returns:
- The value of the field
size
-
writeSize
public void writeSize(long size) Write a value in the fieldsize.- Parameters:
size- The new value for the fieldsize
-