Class DATA_BLOB

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

public class DATA_BLOB extends org.lwjgl.system.Struct<DATA_BLOB> implements org.lwjgl.system.NativeResource
The DATA_BLOB structure contains an arbitrary array of bytes.

Layout


 struct DATA_BLOB {
     DWORD cbData();
     BYTE * pbData();
 }
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    An array of DATA_BLOB 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
    DATA_BLOB(ByteBuffer container)
    Creates a DATA_BLOB instance at the current position of the specified ByteBuffer container.
  • Method Summary

    Modifier and Type
    Method
    Description
    static DATA_BLOB
    Returns a new DATA_BLOB instance allocated with memCalloc.
    calloc(int capacity)
    Returns a new DATA_BLOB.Buffer instance allocated with memCalloc.
    calloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new DATA_BLOB.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static DATA_BLOB
    calloc(org.lwjgl.system.MemoryStack stack)
    Returns a new DATA_BLOB instance allocated on the specified MemoryStack and initializes all its bits to zero.
    int
    the count, in bytes, of data
    static DATA_BLOB
    Returns a new DATA_BLOB instance allocated with BufferUtils.
    create(int capacity)
    Returns a new DATA_BLOB.Buffer instance allocated with BufferUtils.
    static DATA_BLOB
    create(long address)
    Returns a new DATA_BLOB instance for the specified memory address.
    create(long address, int capacity)
    Create a DATA_BLOB.Buffer instance at the specified memory.
    static DATA_BLOB
    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.
    static DATA_BLOB
    Returns a new DATA_BLOB instance allocated with memAlloc.
    malloc(int capacity)
    Returns a new DATA_BLOB.Buffer instance allocated with memAlloc.
    malloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new DATA_BLOB.Buffer instance allocated on the specified MemoryStack.
    static DATA_BLOB
    malloc(org.lwjgl.system.MemoryStack stack)
    Returns a new DATA_BLOB instance allocated on the specified MemoryStack.
    static int
    ncbData(long struct)
    Unsafe version of cbData().
    static void
    ncbData(long struct, int value)
    Sets the specified value to the cbData field of the specified struct.
    static ByteBuffer
    npbData(long struct)
    Unsafe version of pbData.
    static void
    npbData(long struct, ByteBuffer value)
    Unsafe version of pbData.
    a pointer to the data buffer
    Sets the address of the specified ByteBuffer to the pbData() field.
    Copies the specified struct data to this struct.
    int
     
    static void
    validate(long struct)
    Validates pointer members that should not be NULL.

    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.
    • CBDATA

      public static final int CBDATA
      The struct member offsets.
    • PBDATA

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

    • DATA_BLOB

      public DATA_BLOB(ByteBuffer container)
      Creates a DATA_BLOB 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<DATA_BLOB>
    • cbData

      public int cbData()
      the count, in bytes, of data
    • pbData

      public ByteBuffer pbData()
      a pointer to the data buffer
    • pbData

      public DATA_BLOB pbData(ByteBuffer value)
      Sets the address of the specified ByteBuffer to the pbData() field.
    • set

      public DATA_BLOB set(DATA_BLOB src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static DATA_BLOB malloc()
      Returns a new DATA_BLOB instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

      public static DATA_BLOB calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new DATA_BLOB instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

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

      public static DATA_BLOB.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new DATA_BLOB.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
    • ncbData

      public static int ncbData(long struct)
      Unsafe version of cbData().
    • npbData

      public static ByteBuffer npbData(long struct)
      Unsafe version of pbData.
    • ncbData

      public static void ncbData(long struct, int value)
      Sets the specified value to the cbData field of the specified struct.
    • npbData

      public static void npbData(long struct, ByteBuffer value)
      Unsafe version of pbData.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate