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.NativeResourceLayout
struct iovec { void *iov_base(); size_tiov_len(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIOVec.BufferAn array ofIOVecstructs.
-
Constructor Summary
Constructors Constructor Description IOVec(java.nio.ByteBuffer container)Creates aIOVecinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IOVeccalloc()Returns a newIOVecinstance allocated withmemCalloc.static IOVec.Buffercalloc(int capacity)Returns a newIOVec.Bufferinstance allocated withmemCalloc.static IOVec.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newIOVec.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static IOVeccalloc(org.lwjgl.system.MemoryStack stack)Returns a newIOVecinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static IOVeccreate()Returns a newIOVecinstance allocated withBufferUtils.static IOVec.Buffercreate(int capacity)Returns a newIOVec.Bufferinstance allocated withBufferUtils.static IOVeccreate(long address)Returns a newIOVecinstance for the specified memory address.static IOVec.Buffercreate(long address, int capacity)Create aIOVec.Bufferinstance at the specified memory.static IOVeccreateSafe(long address)static IOVec.BuffercreateSafe(long address, int capacity)java.nio.ByteBufferiov_base()starting addressIOVeciov_base(java.nio.ByteBuffer value)Sets the address of the specifiedByteBufferto theiov_base()field.longiov_len()number of bytes to transferIOVeciov_len(long value)Sets the specified value to theiov_len()field.static IOVecmalloc()Returns a newIOVecinstance allocated withmemAlloc.static IOVec.Buffermalloc(int capacity)Returns a newIOVec.Bufferinstance allocated withmemAlloc.static IOVec.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newIOVec.Bufferinstance allocated on the specifiedMemoryStack.static IOVecmalloc(org.lwjgl.system.MemoryStack stack)Returns a newIOVecinstance allocated on the specifiedMemoryStack.static java.nio.ByteBufferniov_base(long struct)Unsafe version ofiov_base.static voidniov_base(long struct, java.nio.ByteBuffer value)Unsafe version ofiov_base.static longniov_len(long struct)Unsafe version ofiov_len().static voidniov_len(long struct, long value)Unsafe version ofiov_len.IOVecset(java.nio.ByteBuffer iov_base, long iov_len)Initializes this struct with the specified values.IOVecset(IOVec src)Copies the specified struct data to this struct.intsizeof()
-
-
-
Constructor Detail
-
IOVec
public IOVec(java.nio.ByteBuffer container)
Creates aIOVecinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin 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 specifiedByteBufferto 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 newIOVecinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static IOVec calloc()
Returns a newIOVecinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static IOVec create()
Returns a newIOVecinstance allocated withBufferUtils.
-
create
public static IOVec create(long address)
Returns a newIOVecinstance for the specified memory address.
-
createSafe
@Nullable public static IOVec createSafe(long address)
-
malloc
public static IOVec.Buffer malloc(int capacity)
Returns a newIOVec.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static IOVec.Buffer calloc(int capacity)
Returns a newIOVec.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static IOVec.Buffer create(int capacity)
Returns a newIOVec.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static IOVec.Buffer create(long address, int capacity)
Create aIOVec.Bufferinstance 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 newIOVecinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static IOVec calloc(org.lwjgl.system.MemoryStack stack)
Returns a newIOVecinstance allocated on the specifiedMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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.
-
-