Class IOVec

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<IOVec>
org.lwjgl.system.linux.IOVec
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class IOVec extends org.lwjgl.system.Struct<IOVec> implements org.lwjgl.system.NativeResource

Layout


 struct iovec {
     void * iov_base();
     size_t iov_len();
 }
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    An array of IOVec structs.

    Nested classes/interfaces inherited from class org.lwjgl.system.Struct

    org.lwjgl.system.Struct.StructValidation

    Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

    org.lwjgl.system.Pointer.Default
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The struct alignment in bytes.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct size in bytes.

    Fields inherited from interface org.lwjgl.system.Pointer

    BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
    IOVec(ByteBuffer container)
    Creates a IOVec instance at the current position of the specified ByteBuffer container.
  • Method Summary

    Modifier and Type
    Method
    Description
    static IOVec
    Returns a new IOVec instance allocated with memCalloc.
    calloc(int capacity)
    Returns a new IOVec.Buffer instance allocated with memCalloc.
    calloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new IOVec.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static IOVec
    calloc(org.lwjgl.system.MemoryStack stack)
    Returns a new IOVec instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static IOVec
    Returns a new IOVec instance allocated with BufferUtils.
    create(int capacity)
    Returns a new IOVec.Buffer instance allocated with BufferUtils.
    static IOVec
    create(long address)
    Returns a new IOVec instance for the specified memory address.
    create(long address, int capacity)
    Create a IOVec.Buffer instance at the specified memory.
    static IOVec
    createSafe(long address)
    Like create, but returns null if address is NULL.
    createSafe(long address, int capacity)
    Like create, but returns null if address is NULL.
    starting address
    Sets the address of the specified ByteBuffer to the iov_base() field.
    long
    number of bytes to transfer
    iov_len(long value)
    Sets the specified value to the iov_len() field.
    static IOVec
    Returns a new IOVec instance allocated with memAlloc.
    malloc(int capacity)
    Returns a new IOVec.Buffer instance allocated with memAlloc.
    malloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new IOVec.Buffer instance allocated on the specified MemoryStack.
    static IOVec
    malloc(org.lwjgl.system.MemoryStack stack)
    Returns a new IOVec instance allocated on the specified MemoryStack.
    static ByteBuffer
    niov_base(long struct)
    Unsafe version of iov_base.
    static void
    niov_base(long struct, ByteBuffer value)
    Unsafe version of iov_base.
    static long
    niov_len(long struct)
    Unsafe version of iov_len().
    static void
    niov_len(long struct, long value)
    Unsafe version of iov_len.
    set(ByteBuffer iov_base, long iov_len)
    Initializes this struct with the specified values.
    set(IOVec src)
    Copies the specified struct data to this struct.
    int
     

    Methods inherited from class org.lwjgl.system.Struct

    clear, free, isNull, validate

    Methods inherited from class org.lwjgl.system.Pointer.Default

    address, equals, hashCode, toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.lwjgl.system.NativeResource

    close, free
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • IOV_BASE

      public static final int IOV_BASE
      The struct member offsets.
    • IOV_LEN

      public static final int IOV_LEN
      The struct member offsets.
  • Constructor Details

    • IOVec

      public IOVec(ByteBuffer container)
      Creates a IOVec instance at the current position of the specified ByteBuffer 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 Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<IOVec>
    • iov_base

      @Nullable public ByteBuffer iov_base()
      starting address
    • iov_len

      public long iov_len()
      number of bytes to transfer
    • iov_base

      public IOVec iov_base(@Nullable ByteBuffer value)
      Sets the address of the specified ByteBuffer to the iov_base() field.
    • iov_len

      public IOVec iov_len(long value)
      Sets the specified value to the iov_len() field.
    • set

      public IOVec set(@Nullable 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 new IOVec instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static IOVec calloc()
      Returns a new IOVec instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static IOVec create()
      Returns a new IOVec instance allocated with BufferUtils.
    • create

      public static IOVec create(long address)
      Returns a new IOVec instance for the specified memory address.
    • createSafe

      @Nullable public static IOVec createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static IOVec.Buffer malloc(int capacity)
      Returns a new IOVec.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static IOVec.Buffer calloc(int capacity)
      Returns a new IOVec.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static IOVec.Buffer create(int capacity)
      Returns a new IOVec.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static IOVec.Buffer create(long address, int capacity)
      Create a IOVec.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      @Nullable public static IOVec.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static IOVec malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new IOVec instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static IOVec calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new IOVec instance allocated on the specified MemoryStack 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 new IOVec.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static IOVec.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new IOVec.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • niov_base

      @Nullable public static ByteBuffer niov_base(long struct)
      Unsafe version of iov_base.
    • niov_len

      public static long niov_len(long struct)
      Unsafe version of iov_len().
    • niov_base

      public static void niov_base(long struct, @Nullable ByteBuffer value)
      Unsafe version of iov_base.
    • niov_len

      public static void niov_len(long struct, long value)
      Unsafe version of iov_len.