LongBuffer API for convenience.
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public static PointerBuffer | Returns: the new pointer bufferthe 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 bufferthe object to be compared. that)Implements java. |
| 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 objectthe object to which this buffer is to be compared ob)Overrides org. |
| public long | |
| public static long | |
| public long | Returns: the pointer at the specifiedindexthe 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 | |
| public PointerBuffer | Returns: This bufferthe 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 offset, int dst.lengththe maximum number of pointers to be written to the specified array; must be non-negative and no larger than length)dst.length - offsetRelative bulk get method. |
| private void | |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| public int | Returns: the current hash code of this bufferOverrides org. |
| public PointerBuffer | Returns: This bufferthe pointer to be written p)Overrides org. |
| 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 bufferthe 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. Pointer at the current position and then increments the position.
|
| public PointerBuffer | |
| public PointerBuffer | Returns: this bufferthe pointer to be written buffer)Overrides org. Writes the address of the specified |
| public PointerBuffer | Returns: this bufferthe pointer to be written buffer)Overrides org. Writes the address of the specified |
| public PointerBuffer | Returns: this bufferthe pointer to be written buffer)Overrides org. Writes the address of the specified |
| public PointerBuffer | Returns: this bufferthe pointer to be written buffer)Overrides org. Writes the address of the specified |
| public PointerBuffer | Returns: this bufferthe pointer to be written buffer)Overrides org. Writes the address of the specified |
| public PointerBuffer | Returns: this bufferthe pointer to be written buffer)Overrides org. Writes the address of the specified |
| public PointerBuffer | |
| public PointerBuffer | |
| public PointerBuffer | |
| public PointerBuffer | |
| public PointerBuffer | |
| public PointerBuffer | |
| public PointerBuffer | Returns: This bufferthe source buffer from which elements are to be read; must not be this buffer src)Overrides org. |
| public PointerBuffer | Returns: This bufferthe 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 offset, int array.lengththe number of pointers to be read from the specified array; must be non-negative and no larger than length)array.length - offsetRelative bulk put method (optional operation). |
| private void | |
| public PointerBuffer | Returns: this bufferthe pointer to be written buffer)Writes the address of the specified |
| public PointerBuffer | putAddressOf(int index, CustomBuffer<?> buffer)
Puts the address of the specified |
| protected PointerBuffer | |
| public int | sizeof()
Implements abstract org. sizeof a single element in the buffer.
|
| PointerBuffer | back to summary |
|---|---|
| protected PointerBuffer(long address, ByteBuffer container, int mark, int position, int limit, int capacity) | |
| allocateDirect | back 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.
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(PointerBuffer that) Implements java. 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.
| |
| create | back 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.
| |
| create | back to summary |
|---|---|
| public static PointerBuffer create(ByteBuffer source) Creates a new PointerBuffer using the specified ByteBuffer as its pointer data source.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object ob) Overrides org. Tells whether or not this buffer is equal to another object. Two pointer buffers are equal if, and only if,
A pointer buffer is not equal to any other type of object.
| |
| get | back to summary |
|---|---|
| public long get() Relative get method. Reads the pointer at this buffer's current position, and then increments the position.
| |
| get | back to summary |
|---|---|
| public static long get(ByteBuffer source) Convenience relative get from a source ByteBuffer.
| |
| get | back to summary |
|---|---|
| public long get(int index) Absolute get method. Reads the pointer at the specified
| |
| get | back to summary |
|---|---|
| public static long get(ByteBuffer source, int index) Convenience absolute get from a source ByteBuffer.
| |
| get | back 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, 0, a.length)
| |
| get | back 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 Otherwise, this method copies In other words, an invocation of this method of the form
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.
| |
| get32 | back to summary |
|---|---|
| private void get32(long[] dst, int offset, int length) | |
| getByteBuffer | back 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
| |
| getByteBuffer | back to summary |
|---|---|
| public ByteBuffer getByteBuffer(int index, int size) Returns a | |
| getDoubleBuffer | back 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
| |
| getDoubleBuffer | back to summary |
|---|---|
| public DoubleBuffer getDoubleBuffer(int index, int size) Returns a | |
| getFloatBuffer | back 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
| |
| getFloatBuffer | back to summary |
|---|---|
| public FloatBuffer getFloatBuffer(int index, int size) Returns a | |
| getIntBuffer | back 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
| |
| getIntBuffer | back to summary |
|---|---|
| public IntBuffer getIntBuffer(int index, int size) Returns a | |
| getLongBuffer | back 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
| |
| getLongBuffer | back to summary |
|---|---|
| public LongBuffer getLongBuffer(int index, int size) Returns a | |
| getPointerBuffer | back 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
| |
| getPointerBuffer | back to summary |
|---|---|
| public PointerBuffer getPointerBuffer(int index, int size) Returns a | |
| getShortBuffer | back 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
| |
| getShortBuffer | back to summary |
|---|---|
| public ShortBuffer getShortBuffer(int index, int size) Returns a | |
| getStringASCII | back 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
| |
| getStringASCII | back to summary |
|---|---|
| public String getStringASCII(int index) Decodes the ASCII string that starts at the address found at the specified | |
| getStringUTF16 | back 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
| |
| getStringUTF16 | back to summary |
|---|---|
| public String getStringUTF16(int index) Decodes the UTF-16 string that starts at the address found at the specified | |
| getStringUTF8 | back 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
| |
| getStringUTF8 | back to summary |
|---|---|
| public String getStringUTF8(int index) Decodes the UTF-8 string that starts at the address found at the specified | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides org. 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 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.
| |
| put | back to summary |
|---|---|
| public PointerBuffer put(long p) Overrides org. Relative put method (optional operation). Writes the specified pointer into this buffer at the current position, and then increments the position.
| |
| put | back to summary |
|---|---|
| public static void put(ByteBuffer target, long p) Convenience relative put on a target ByteBuffer.
| |
| put | back to summary |
|---|---|
| public PointerBuffer put(int index, long p) Absolute put method (optional operation). Writes the specified pointer into this buffer at the specified
| |
| put | back to summary |
|---|---|
| public static void put(ByteBuffer target, int index, long p) Convenience absolute put on a target ByteBuffer.
| |
| put | back to summary |
|---|---|
| public PointerBuffer put(Pointer pointer) Overrides org. Puts the pointer value of the specified
| |
| put | back to summary |
|---|---|
| public PointerBuffer put(int index, Pointer pointer) Puts the pointer value of the specified | |
| put | back to summary |
|---|---|
| public PointerBuffer put(ByteBuffer buffer) Overrides org. Writes the address of the specified
| |
| put | back to summary |
|---|---|
| public PointerBuffer put(ShortBuffer buffer) Overrides org. Writes the address of the specified
| |
| put | back to summary |
|---|---|
| public PointerBuffer put(IntBuffer buffer) Overrides org. Writes the address of the specified
| |
| put | back to summary |
|---|---|
| public PointerBuffer put(LongBuffer buffer) Overrides org. Writes the address of the specified
| |
| put | back to summary |
|---|---|
| public PointerBuffer put(FloatBuffer buffer) Overrides org. Writes the address of the specified
| |
| put | back to summary |
|---|---|
| public PointerBuffer put(DoubleBuffer buffer) Overrides org. Writes the address of the specified
| |
| put | back to summary |
|---|---|
| public PointerBuffer put(int index, ByteBuffer buffer) Puts the address of the specified | |
| put | back to summary |
|---|---|
| public PointerBuffer put(int index, ShortBuffer buffer) Puts the address of the specified | |
| put | back to summary |
|---|---|
| public PointerBuffer put(int index, IntBuffer buffer) Puts the address of the specified | |
| put | back to summary |
|---|---|
| public PointerBuffer put(int index, LongBuffer buffer) Puts the address of the specified | |
| put | back to summary |
|---|---|
| public PointerBuffer put(int index, FloatBuffer buffer) Puts the address of the specified | |
| put | back to summary |
|---|---|
| public PointerBuffer put(int index, DoubleBuffer buffer) Puts the address of the specified | |
| put | back to summary |
|---|---|
| public PointerBuffer put(long[] src) Overrides org. 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, 0, a.length)
| |
| put | back 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 Otherwise, this method copies In other words, an invocation of this method of the form
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.
| |
| put32 | back to summary |
|---|---|
| private void put32(long[] src, int offset, int length) | |
| putAddressOf | back to summary |
|---|---|
| public PointerBuffer putAddressOf(CustomBuffer<?> buffer) Writes the address of the specified
| |
| putAddressOf | back to summary |
|---|---|
| public PointerBuffer putAddressOf(int index, CustomBuffer<?> buffer) Puts the address of the specified | |
| self | back to summary |
|---|---|
| protected PointerBuffer self() Implements abstract org.
| |
| sizeof | back to summary |
|---|---|
| public int sizeof() Implements abstract org. Doc from org. Returns the
| |