Package org.lwjgl.system.linux
Class IOVec
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.system.linux.IOVec
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class IOVec extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Layout
struct iovec { void *
iov_base()
; size_tiov_len()
; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IOVec.Buffer
An array ofIOVec
structs.
-
Constructor Summary
Constructors Constructor Description IOVec(java.nio.ByteBuffer container)
Creates aIOVec
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IOVec
calloc()
Returns a newIOVec
instance allocated withmemCalloc
.static IOVec.Buffer
calloc(int capacity)
Returns a newIOVec.Buffer
instance allocated withmemCalloc
.static IOVec.Buffer
calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newIOVec.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static IOVec
calloc(org.lwjgl.system.MemoryStack stack)
Returns a newIOVec
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static IOVec
create()
Returns a newIOVec
instance allocated withBufferUtils
.static IOVec.Buffer
create(int capacity)
Returns a newIOVec.Buffer
instance allocated withBufferUtils
.static IOVec
create(long address)
Returns a newIOVec
instance for the specified memory address.static IOVec.Buffer
create(long address, int capacity)
Create aIOVec.Buffer
instance at the specified memory.static IOVec
createSafe(long address)
static IOVec.Buffer
createSafe(long address, int capacity)
java.nio.ByteBuffer
iov_base()
starting addressIOVec
iov_base(java.nio.ByteBuffer value)
Sets the address of the specifiedByteBuffer
to theiov_base()
field.long
iov_len()
number of bytes to transferIOVec
iov_len(long value)
Sets the specified value to theiov_len()
field.static IOVec
malloc()
Returns a newIOVec
instance allocated withmemAlloc
.static IOVec.Buffer
malloc(int capacity)
Returns a newIOVec.Buffer
instance allocated withmemAlloc
.static IOVec.Buffer
malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newIOVec.Buffer
instance allocated on the specifiedMemoryStack
.static IOVec
malloc(org.lwjgl.system.MemoryStack stack)
Returns a newIOVec
instance allocated on the specifiedMemoryStack
.static java.nio.ByteBuffer
niov_base(long struct)
Unsafe version ofiov_base
.static void
niov_base(long struct, java.nio.ByteBuffer value)
Unsafe version ofiov_base
.static long
niov_len(long struct)
Unsafe version ofiov_len()
.static void
niov_len(long struct, long value)
Unsafe version ofiov_len
.IOVec
set(java.nio.ByteBuffer iov_base, long iov_len)
Initializes this struct with the specified values.IOVec
set(IOVec src)
Copies the specified struct data to this struct.int
sizeof()
-
-
-
Constructor Detail
-
IOVec
public IOVec(java.nio.ByteBuffer container)
Creates aIOVec
instance at the current position of the specifiedByteBuffer
container. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
iov_base
@Nullable public java.nio.ByteBuffer iov_base()
starting address
-
iov_len
public long iov_len()
number of bytes to transfer
-
iov_base
public IOVec iov_base(@Nullable java.nio.ByteBuffer value)
Sets the address of the specifiedByteBuffer
to theiov_base()
field.
-
set
public IOVec set(@Nullable java.nio.ByteBuffer iov_base, long iov_len)
Initializes this struct with the specified values.
-
set
public IOVec set(IOVec src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static IOVec malloc()
Returns a newIOVec
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static IOVec calloc()
Returns a newIOVec
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static IOVec create()
Returns a newIOVec
instance allocated withBufferUtils
.
-
create
public static IOVec create(long address)
Returns a newIOVec
instance for the specified memory address.
-
createSafe
@Nullable public static IOVec createSafe(long address)
-
malloc
public static IOVec.Buffer malloc(int capacity)
Returns a newIOVec.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static IOVec.Buffer calloc(int capacity)
Returns a newIOVec.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static IOVec.Buffer create(int capacity)
Returns a newIOVec.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static IOVec.Buffer create(long address, int capacity)
Create aIOVec.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static IOVec.Buffer createSafe(long address, int capacity)
-
malloc
public static IOVec malloc(org.lwjgl.system.MemoryStack stack)
Returns a newIOVec
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
public static IOVec calloc(org.lwjgl.system.MemoryStack stack)
Returns a newIOVec
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
public static IOVec.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newIOVec.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
calloc
public static IOVec.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newIOVec.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
niov_base
@Nullable public static java.nio.ByteBuffer niov_base(long struct)
Unsafe version ofiov_base
.
-
niov_len
public static long niov_len(long struct)
Unsafe version ofiov_len()
.
-
niov_base
public static void niov_base(long struct, @Nullable java.nio.ByteBuffer value)
Unsafe version ofiov_base
.
-
niov_len
public static void niov_len(long struct, long value)
Unsafe version ofiov_len
.
-
-