Top Description Fields Constructors Methods
org.lwjgl

public Class PointerBuffer

extends CustomBuffer<PointerBuffer>
implements Comparable<PointerBuffer>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable
Imports
org.lwjgl.system.*, javax.annotation.*, java.nio.*

This class is a container for architecture-independent pointer data. Its interface mirrors the LongBuffer API for convenience.

Field Summary

Inherited from org.lwjgl.system.CustomBuffer:
capacitycontainerlimitmarkposition

Constructor Summary

AccessConstructor and Description
protected
PointerBuffer(long address, ByteBuffer container, int mark, int position, int limit, int capacity)

Method Summary

Modifier and TypeMethod and Description
public static PointerBuffer

Returns:

the new pointer buffer
allocateDirect
(int
the new buffer's capacity, in pointers
capacity
)

Allocates a new pointer buffer.

public int

Returns:

A negative integer, zero, or a positive integer as this buffer is less than, equal to, or greater than the specified buffer
compareTo
(PointerBuffer
the object to be compared.
that
)

Implements java.lang.Comparable.compareTo.

Compares this buffer to another.
public static PointerBuffer
create(long
the starting memory address
address
,
int
the buffer capacity, in number of pointers
capacity
)

Creates a new PointerBuffer that starts at the specified memory address and has the specified capacity.

public static PointerBuffer
create(ByteBuffer
the source buffer
source
)

Creates a new PointerBuffer using the specified ByteBuffer as its pointer data source.

public boolean

Returns:

true if, and only if, this buffer is equal to the given object
equals
(Object
the object to which this buffer is to be compared
ob
)

Overrides org.lwjgl.system.Pointer.Default.equals.

Tells whether or not this buffer is equal to another object.
public long

Returns:

the pointer at the buffer's current position
get
()

Relative get method.

public static long
get(ByteBuffer
the source ByteBuffer
source
)

Convenience relative get from a source ByteBuffer.

public long

Returns:

the pointer at the specified index
get
(int
the index from which the pointer will be read
index
)

Absolute get method.

public static long
get(ByteBuffer
the source ByteBuffer
source
,
int
the index at which the pointer will be read
index
)

Convenience absolute get from a source ByteBuffer.

public PointerBuffer

Returns:

This buffer
get
(long[] dst)

Relative bulk get method.

public PointerBuffer

Returns:

This buffer
get
(long[]
the array into which pointers are to be written
dst
,
int
the offset within the array of the first pointer to be written; must be non-negative and no larger than dst.length
offset
,
int
the maximum number of pointers to be written to the specified array; must be non-negative and no larger than dst.length - offset
length
)

Relative bulk get method.

private void
get32(long[] dst, int offset, int length)

public ByteBuffer
getByteBuffer(int size)

Reads the pointer at this buffer's current position, and then increments the position.

public ByteBuffer
getByteBuffer(int index, int size)

Returns a ByteBuffer instance that starts at the address found at the specified index and has capacity equal to the specified size.

public DoubleBuffer
getDoubleBuffer(int size)

Reads the pointer at this buffer's current position, and then increments the position.

public DoubleBuffer
getDoubleBuffer(int index, int size)

Returns a DoubleBuffer instance that starts at the address found at the specified index and has capacity equal to the specified size.

public FloatBuffer
getFloatBuffer(int size)

Reads the pointer at this buffer's current position, and then increments the position.

public FloatBuffer
getFloatBuffer(int index, int size)

Returns a FloatBuffer instance that starts at the address found at the specified index and has capacity equal to the specified size.

public IntBuffer
getIntBuffer(int size)

Reads the pointer at this buffer's current position, and then increments the position.

public IntBuffer
getIntBuffer(int index, int size)

Returns a IntBuffer instance that starts at the address found at the specified index and has capacity equal to the specified size.

public LongBuffer
getLongBuffer(int size)

Reads the pointer at this buffer's current position, and then increments the position.

public LongBuffer
getLongBuffer(int index, int size)

Returns a LongBuffer instance that starts at the address found at the specified index and has capacity equal to the specified size.

public PointerBuffer
getPointerBuffer(int size)

Reads the pointer at this buffer's current position, and then increments the position.

public PointerBuffer
getPointerBuffer(int index, int size)

Returns a PointerBuffer instance that starts at the address found at the specified index and has capacity equal to the specified size.

public ShortBuffer
getShortBuffer(int size)

Reads the pointer at this buffer's current position, and then increments the position.

public ShortBuffer
getShortBuffer(int index, int size)

Returns a ShortBuffer instance that starts at the address found at the specified index and has capacity equal to the specified size.

public String
getStringASCII()

Reads the pointer at this buffer's current position, and then increments the position.

public String
getStringASCII(int index)

Decodes the ASCII string that starts at the address found at the specified index.

public String
getStringUTF16()

Reads the pointer at this buffer's current position, and then increments the position.

public String
getStringUTF16(int index)

Decodes the UTF-16 string that starts at the address found at the specified index.

public String
getStringUTF8()

Reads the pointer at this buffer's current position, and then increments the position.

public String
getStringUTF8(int index)

Decodes the UTF-8 string that starts at the address found at the specified index.

public int

Returns:

the current hash code of this buffer
hashCode
()

Overrides org.lwjgl.system.Pointer.Default.hashCode.

Returns the current hash code of this buffer.
public PointerBuffer

Returns:

This buffer
put
(long
the pointer to be written
p
)

Overrides org.lwjgl.system.CustomBuffer.put.

Relative put method  (optional operation).
public static void
put(ByteBuffer
the target ByteBuffer
target
,
long
the pointer value to be written
p
)

Convenience relative put on a target ByteBuffer.

public PointerBuffer

Returns:

This buffer
put
(int
the index at which the pointer will be written
index
,
long
the pointer value to be written
p
)

Absolute put method  (optional operation).

public static void
put(ByteBuffer
the target ByteBuffer
target
,
int
the index at which the pointer will be written
index
,
long
the pointer value to be written
p
)

Convenience absolute put on a target ByteBuffer.

public PointerBuffer
put(Pointer
the source buffer from which elements are to be read; must not be this buffer
pointer
)

Overrides org.lwjgl.system.CustomBuffer.put.

Puts the pointer value of the specified Pointer at the current position and then increments the position.
public PointerBuffer
put(int index, Pointer pointer)

Puts the pointer value of the specified Pointer at the specified index.

public PointerBuffer

Returns:

this buffer
put
(ByteBuffer
the pointer to be written
buffer
)

Overrides org.lwjgl.system.CustomBuffer.put.

Writes the address of the specified buffer into this buffer at the current position, and then increments the position.

public PointerBuffer

Returns:

this buffer
put
(ShortBuffer
the pointer to be written
buffer
)

Overrides org.lwjgl.system.CustomBuffer.put.

Writes the address of the specified buffer into this buffer at the current position, and then increments the position.

public PointerBuffer

Returns:

this buffer
put
(IntBuffer
the pointer to be written
buffer
)

Overrides org.lwjgl.system.CustomBuffer.put.

Writes the address of the specified buffer into this buffer at the current position, and then increments the position.

public PointerBuffer

Returns:

this buffer
put
(LongBuffer
the pointer to be written
buffer
)

Overrides org.lwjgl.system.CustomBuffer.put.

Writes the address of the specified buffer into this buffer at the current position, and then increments the position.

public PointerBuffer

Returns:

this buffer
put
(FloatBuffer
the pointer to be written
buffer
)

Overrides org.lwjgl.system.CustomBuffer.put.

Writes the address of the specified buffer into this buffer at the current position, and then increments the position.

public PointerBuffer

Returns:

this buffer
put
(DoubleBuffer
the pointer to be written
buffer
)

Overrides org.lwjgl.system.CustomBuffer.put.

Writes the address of the specified buffer into this buffer at the current position, and then increments the position.

public PointerBuffer
put(int index, ByteBuffer buffer)

Puts the address of the specified buffer at the specified index.

public PointerBuffer
put(int index, ShortBuffer buffer)

Puts the address of the specified buffer at the specified index.

public PointerBuffer
put(int index, IntBuffer buffer)

Puts the address of the specified buffer at the specified index.

public PointerBuffer
put(int index, LongBuffer buffer)

Puts the address of the specified buffer at the specified index.

public PointerBuffer
put(int index, FloatBuffer buffer)

Puts the address of the specified buffer at the specified index.

public PointerBuffer
put(int index, DoubleBuffer buffer)

Puts the address of the specified buffer at the specified index.

public PointerBuffer

Returns:

This buffer
put
(long[]
the source buffer from which elements are to be read; must not be this buffer
src
)

Overrides org.lwjgl.system.CustomBuffer.put.

Relative bulk put method  (optional operation).
public PointerBuffer

Returns:

This buffer
put
(long[]
the array from which pointers are to be read
src
,
int
the offset within the array of the first pointer to be read; must be non-negative and no larger than array.length
offset
,
int
the number of pointers to be read from the specified array; must be non-negative and no larger than array.length - offset
length
)

Relative bulk put method  (optional operation).

private void
put32(long[] src, int offset, int length)

public PointerBuffer

Returns:

this buffer
putAddressOf
(CustomBuffer<?>
the pointer to be written
buffer
)

Writes the address of the specified buffer into this buffer at the current position, and then increments the position.

public PointerBuffer
putAddressOf(int index, CustomBuffer<?> buffer)

Puts the address of the specified buffer at the specified index.

protected PointerBuffer
public int
sizeof()

Implements abstract org.lwjgl.system.CustomBuffer.sizeof.

Returns the sizeof a single element in the buffer.
Inherited from org.lwjgl.system.CustomBuffer:
addressaddressaddress0capacityclearcompactduplicateflipfreehasRemaininglimitlimitmarknextGetIndexnextPutIndexpositionpositionremainingresetrewindsliceslicetoString

Constructor Detail

PointerBufferback to summary
protected PointerBuffer(long address, ByteBuffer container, int mark, int position, int limit, int capacity)

Method Detail

allocateDirectback to summary
public static PointerBuffer allocateDirect(int capacity)

Allocates a new pointer buffer.

The new buffer's position will be zero, its limit will be its capacity, and its mark will be undefined.

Parameters
capacity:int

the new buffer's capacity, in pointers

Returns:PointerBuffer

the new pointer buffer

Exceptions
IllegalArgumentException:
If the capacity is a negative integer
compareToback to summary
public int compareTo(PointerBuffer that)

Implements java.lang.Comparable.compareTo.

Compares this buffer to another.

Two pointer buffers are compared by comparing their sequences of remaining elements lexicographically, without regard to the starting position of each sequence within its corresponding buffer.

A pointer buffer is not comparable to any other type of object.

Parameters
that:PointerBuffer

Doc from java.lang.Comparable.compareTo.

the object to be compared.

Returns:int

A negative integer, zero, or a positive integer as this buffer is less than, equal to, or greater than the specified buffer

Annotations
@Override
createback to summary
public static PointerBuffer create(long address, int capacity)

Creates a new PointerBuffer that starts at the specified memory address and has the specified capacity.

Parameters
address:long

the starting memory address

capacity:int

the buffer capacity, in number of pointers

createback to summary
public static PointerBuffer create(ByteBuffer source)

Creates a new PointerBuffer using the specified ByteBuffer as its pointer data source.

Parameters
source:ByteBuffer

the source buffer

equalsback to summary
public boolean equals(Object ob)

Overrides org.lwjgl.system.Pointer.Default.equals.

Tells whether or not this buffer is equal to another object.

Two pointer buffers are equal if, and only if,

  1. They have the same element type,
  2. They have the same number of remaining elements, and
  3. The two sequences of remaining elements, considered independently of their starting positions, are pointwise equal.

A pointer buffer is not equal to any other type of object.

Parameters
ob:Object

the object to which this buffer is to be compared

Returns:boolean

true if, and only if, this buffer is equal to the given object

getback to summary
public long get()

Relative get method. Reads the pointer at this buffer's current position, and then increments the position.

Returns:long

the pointer at the buffer's current position

Exceptions
BufferUnderflowException:
If the buffer's current position is not smaller than its limit
getback to summary
public static long get(ByteBuffer source)

Convenience relative get from a source ByteBuffer.

Parameters
source:ByteBuffer

the source ByteBuffer

getback to summary
public long get(int index)

Absolute get method. Reads the pointer at the specified index.

Parameters
index:int

the index from which the pointer will be read

Returns:long

the pointer at the specified index

Exceptions
IndexOutOfBoundsException:
If index is negative or not smaller than the buffer's limit
getback to summary
public static long get(ByteBuffer source, int index)

Convenience absolute get from a source ByteBuffer.

Parameters
source:ByteBuffer

the source ByteBuffer

index:int

the index at which the pointer will be read

getback to summary
public PointerBuffer get(long[] dst)

Relative bulk get method.

This method transfers pointers from this buffer into the specified destination array. An invocation of this method of the form src.get(a) behaves in exactly the same way as the invocation

    src.get(a, 0, a.length) 
Returns:PointerBuffer

This buffer

Exceptions
BufferUnderflowException:
If there are fewer than length pointers remaining in this buffer
getback to summary
public PointerBuffer get(long[] dst, int offset, int length)

Relative bulk get method.

This method transfers pointers from this buffer into the specified destination array. If there are fewer pointers remaining in the buffer than are required to satisfy the request, that is, if length > remaining(), then no pointers are transferred and a BufferUnderflowException is thrown.

Otherwise, this method copies length pointers from this buffer into the specified array, starting at the current position of this buffer and at the specified offset in the array. The position of this buffer is then incremented by length.

In other words, an invocation of this method of the form src.get(dst, off, len) has exactly the same effect as the loop

    for (int i = off; i < off + len; i++)
        dst[i] = src.get(); 

except that it first checks that there are sufficient pointers in this buffer and it is potentially much more efficient.

Parameters
dst:long[]

the array into which pointers are to be written

offset:int

the offset within the array of the first pointer to be written; must be non-negative and no larger than dst.length

length:int

the maximum number of pointers to be written to the specified array; must be non-negative and no larger than dst.length - offset

Returns:PointerBuffer

This buffer

Exceptions
BufferUnderflowException:
If there are fewer than length pointers remaining in this buffer
IndexOutOfBoundsException:
If the preconditions on the offset and length parameters do not hold
get32back to summary
private void get32(long[] dst, int offset, int length)
getByteBufferback to summary
public ByteBuffer getByteBuffer(int size)

Reads the pointer at this buffer's current position, and then increments the position. The pointer is returned as a ByteBuffer instance that starts at the pointer address and has capacity equal to the specified size.

Exceptions
BufferUnderflowException:
If the buffer's current position is not smaller than its limit
getByteBufferback to summary
public ByteBuffer getByteBuffer(int index, int size)

Returns a ByteBuffer instance that starts at the address found at the specified index and has capacity equal to the specified size.

getDoubleBufferback to summary
public DoubleBuffer getDoubleBuffer(int size)

Reads the pointer at this buffer's current position, and then increments the position. The pointer is returned as a DoubleBuffer instance that starts at the pointer address and has capacity equal to the specified size.

Exceptions
BufferUnderflowException:
If the buffer's current position is not smaller than its limit
getDoubleBufferback to summary
public DoubleBuffer getDoubleBuffer(int index, int size)

Returns a DoubleBuffer instance that starts at the address found at the specified index and has capacity equal to the specified size.

getFloatBufferback to summary
public FloatBuffer getFloatBuffer(int size)

Reads the pointer at this buffer's current position, and then increments the position. The pointer is returned as a FloatBuffer instance that starts at the pointer address and has capacity equal to the specified size.

Exceptions
BufferUnderflowException:
If the buffer's current position is not smaller than its limit
getFloatBufferback to summary
public FloatBuffer getFloatBuffer(int index, int size)

Returns a FloatBuffer instance that starts at the address found at the specified index and has capacity equal to the specified size.

getIntBufferback to summary
public IntBuffer getIntBuffer(int size)

Reads the pointer at this buffer's current position, and then increments the position. The pointer is returned as a IntBuffer instance that starts at the pointer address and has capacity equal to the specified size.

Exceptions
BufferUnderflowException:
If the buffer's current position is not smaller than its limit
getIntBufferback to summary
public IntBuffer getIntBuffer(int index, int size)

Returns a IntBuffer instance that starts at the address found at the specified index and has capacity equal to the specified size.

getLongBufferback to summary
public LongBuffer getLongBuffer(int size)

Reads the pointer at this buffer's current position, and then increments the position. The pointer is returned as a LongBuffer instance that starts at the pointer address and has capacity equal to the specified size.

Exceptions
BufferUnderflowException:
If the buffer's current position is not smaller than its limit
getLongBufferback to summary
public LongBuffer getLongBuffer(int index, int size)

Returns a LongBuffer instance that starts at the address found at the specified index and has capacity equal to the specified size.

getPointerBufferback to summary
public PointerBuffer getPointerBuffer(int size)

Reads the pointer at this buffer's current position, and then increments the position. The pointer is returned as a PointerBuffer instance that starts at the pointer address and has capacity equal to the specified size.

Exceptions
BufferUnderflowException:
If the buffer's current position is not smaller than its limit
getPointerBufferback to summary
public PointerBuffer getPointerBuffer(int index, int size)

Returns a PointerBuffer instance that starts at the address found at the specified index and has capacity equal to the specified size.

getShortBufferback to summary
public ShortBuffer getShortBuffer(int size)

Reads the pointer at this buffer's current position, and then increments the position. The pointer is returned as a ShortBuffer instance that starts at the pointer address and has capacity equal to the specified size.

Exceptions
BufferUnderflowException:
If the buffer's current position is not smaller than its limit
getShortBufferback to summary
public ShortBuffer getShortBuffer(int index, int size)

Returns a ShortBuffer instance that starts at the address found at the specified index and has capacity equal to the specified size.

getStringASCIIback to summary
public String getStringASCII()

Reads the pointer at this buffer's current position, and then increments the position. The pointer is evaluated as a null-terminated ASCII string, which is decoded and returned as a String instance.

Exceptions
BufferUnderflowException:
If the buffer's current position is not smaller than its limit
getStringASCIIback to summary
public String getStringASCII(int index)

Decodes the ASCII string that starts at the address found at the specified index.

getStringUTF16back to summary
public String getStringUTF16()

Reads the pointer at this buffer's current position, and then increments the position. The pointer is evaluated as a null-terminated UTF-16 string, which is decoded and returned as a String instance.

Exceptions
BufferUnderflowException:
If the buffer's current position is not smaller than its limit
getStringUTF16back to summary
public String getStringUTF16(int index)

Decodes the UTF-16 string that starts at the address found at the specified index.

getStringUTF8back to summary
public String getStringUTF8()

Reads the pointer at this buffer's current position, and then increments the position. The pointer is evaluated as a null-terminated UTF-8 string, which is decoded and returned as a String instance.

Exceptions
BufferUnderflowException:
If the buffer's current position is not smaller than its limit
getStringUTF8back to summary
public String getStringUTF8(int index)

Decodes the UTF-8 string that starts at the address found at the specified index.

hashCodeback to summary
public int hashCode()

Overrides org.lwjgl.system.Pointer.Default.hashCode.

Returns the current hash code of this buffer.

The hash code of a pointer buffer depends only upon its remaining elements; that is, upon the elements from position() up to, and including, the element at limit() - 1.

Because buffer hash codes are content-dependent, it is inadvisable to use buffers as keys in hash maps or similar data structures unless it is known that their contents will not change.

Returns:int

the current hash code of this buffer

putback to summary
public PointerBuffer put(long p)

Overrides org.lwjgl.system.CustomBuffer.put.

Relative put method  (optional operation).

Writes the specified pointer into this buffer at the current position, and then increments the position.

Parameters
p:long

the pointer to be written

Returns:PointerBuffer

This buffer

Exceptions
BufferOverflowException:
If this buffer's current position is not smaller than its limit
putback to summary
public static void put(ByteBuffer target, long p)

Convenience relative put on a target ByteBuffer.

Parameters
target:ByteBuffer

the target ByteBuffer

p:long

the pointer value to be written

putback to summary
public PointerBuffer put(int index, long p)

Absolute put method  (optional operation).

Writes the specified pointer into this buffer at the specified index.

Parameters
index:int

the index at which the pointer will be written

p:long

the pointer value to be written

Returns:PointerBuffer

This buffer

Exceptions
IndexOutOfBoundsException:
If index is negative or not smaller than the buffer's limit
putback to summary
public static void put(ByteBuffer target, int index, long p)

Convenience absolute put on a target ByteBuffer.

Parameters
target:ByteBuffer

the target ByteBuffer

index:int

the index at which the pointer will be written

p:long

the pointer value to be written

putback to summary
public PointerBuffer put(Pointer pointer)

Overrides org.lwjgl.system.CustomBuffer.put.

Puts the pointer value of the specified Pointer at the current position and then increments the position.

Parameters
pointer:Pointer

Doc from org.lwjgl.system.CustomBuffer.put.

the source buffer from which elements are to be read; must not be this buffer

Returns:PointerBuffer

Doc from org.lwjgl.system.CustomBuffer.put.

This buffer

putback to summary
public PointerBuffer put(int index, Pointer pointer)

Puts the pointer value of the specified Pointer at the specified index.

putback to summary
public PointerBuffer put(ByteBuffer buffer)

Overrides org.lwjgl.system.CustomBuffer.put.

Writes the address of the specified buffer into this buffer at the current position, and then increments the position.

Parameters
buffer:ByteBuffer

the pointer to be written

Returns:PointerBuffer

this buffer

Exceptions
BufferOverflowException:
If this buffer's current position is not smaller than its limit
putback to summary
public PointerBuffer put(ShortBuffer buffer)

Overrides org.lwjgl.system.CustomBuffer.put.

Writes the address of the specified buffer into this buffer at the current position, and then increments the position.

Parameters
buffer:ShortBuffer

the pointer to be written

Returns:PointerBuffer

this buffer

Exceptions
BufferOverflowException:
If this buffer's current position is not smaller than its limit
putback to summary
public PointerBuffer put(IntBuffer buffer)

Overrides org.lwjgl.system.CustomBuffer.put.

Writes the address of the specified buffer into this buffer at the current position, and then increments the position.

Parameters
buffer:IntBuffer

the pointer to be written

Returns:PointerBuffer

this buffer

Exceptions
BufferOverflowException:
If this buffer's current position is not smaller than its limit
putback to summary
public PointerBuffer put(LongBuffer buffer)

Overrides org.lwjgl.system.CustomBuffer.put.

Writes the address of the specified buffer into this buffer at the current position, and then increments the position.

Parameters
buffer:LongBuffer

the pointer to be written

Returns:PointerBuffer

this buffer

Exceptions
BufferOverflowException:
If this buffer's current position is not smaller than its limit
putback to summary
public PointerBuffer put(FloatBuffer buffer)

Overrides org.lwjgl.system.CustomBuffer.put.

Writes the address of the specified buffer into this buffer at the current position, and then increments the position.

Parameters
buffer:FloatBuffer

the pointer to be written

Returns:PointerBuffer

this buffer

Exceptions
BufferOverflowException:
If this buffer's current position is not smaller than its limit
putback to summary
public PointerBuffer put(DoubleBuffer buffer)

Overrides org.lwjgl.system.CustomBuffer.put.

Writes the address of the specified buffer into this buffer at the current position, and then increments the position.

Parameters
buffer:DoubleBuffer

the pointer to be written

Returns:PointerBuffer

this buffer

Exceptions
BufferOverflowException:
If this buffer's current position is not smaller than its limit
putback to summary
public PointerBuffer put(int index, ByteBuffer buffer)

Puts the address of the specified buffer at the specified index.

putback to summary
public PointerBuffer put(int index, ShortBuffer buffer)

Puts the address of the specified buffer at the specified index.

putback to summary
public PointerBuffer put(int index, IntBuffer buffer)

Puts the address of the specified buffer at the specified index.

putback to summary
public PointerBuffer put(int index, LongBuffer buffer)

Puts the address of the specified buffer at the specified index.

putback to summary
public PointerBuffer put(int index, FloatBuffer buffer)

Puts the address of the specified buffer at the specified index.

putback to summary
public PointerBuffer put(int index, DoubleBuffer buffer)

Puts the address of the specified buffer at the specified index.

putback to summary
public PointerBuffer put(long[] src)

Overrides org.lwjgl.system.CustomBuffer.put.

Relative bulk put method  (optional operation).

This method transfers the entire content of the specified source pointer array into this buffer. An invocation of this method of the form dst.put(a) behaves in exactly the same way as the invocation

    dst.put(a, 0, a.length) 
Parameters
src:long[]

Doc from org.lwjgl.system.CustomBuffer.put.

the source buffer from which elements are to be read; must not be this buffer

Returns:PointerBuffer

This buffer

Exceptions
BufferOverflowException:
If there is insufficient space in this buffer
putback to summary
public PointerBuffer put(long[] src, int offset, int length)

Relative bulk put method  (optional operation).

This method transfers pointers into this buffer from the specified source array. If there are more pointers to be copied from the array than remain in this buffer, that is, if length > remaining(), then no pointers are transferred and a BufferOverflowException is thrown.

Otherwise, this method copies length pointers from the specified array into this buffer, starting at the specified offset in the array and at the current position of this buffer. The position of this buffer is then incremented by length.

In other words, an invocation of this method of the form dst.put(src, off, len) has exactly the same effect as the loop

    for (int i = off; i < off + len; i++)
        dst.put(a[i]); 

except that it first checks that there is sufficient space in this buffer and it is potentially much more efficient.

Parameters
src:long[]

the array from which pointers are to be read

offset:int

the offset within the array of the first pointer to be read; must be non-negative and no larger than array.length

length:int

the number of pointers to be read from the specified array; must be non-negative and no larger than array.length - offset

Returns:PointerBuffer

This buffer

Exceptions
BufferOverflowException:
If there is insufficient space in this buffer
IndexOutOfBoundsException:
If the preconditions on the offset and length parameters do not hold
put32back to summary
private void put32(long[] src, int offset, int length)
putAddressOfback to summary
public PointerBuffer putAddressOf(CustomBuffer<?> buffer)

Writes the address of the specified buffer into this buffer at the current position, and then increments the position.

Parameters
buffer:CustomBuffer<?>

the pointer to be written

Returns:PointerBuffer

this buffer

Exceptions
BufferOverflowException:
If this buffer's current position is not smaller than its limit
putAddressOfback to summary
public PointerBuffer putAddressOf(int index, CustomBuffer<?> buffer)

Puts the address of the specified buffer at the specified index.

selfback to summary
protected PointerBuffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override
sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.CustomBuffer.sizeof.

Doc from org.lwjgl.system.CustomBuffer.sizeof.

Returns the sizeof a single element in the buffer.

Annotations
@Override