|
GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java (public API).
|
Hardware independent container for various kinds of buffers. More...
Public Member Functions | |
| int | elementSize () |
| Returns byte size of one element. More... | |
| int | limit () |
| Returns this buffer's element limit. More... | |
| B | limit (int newLim) |
| Sets this buffer's element limit. More... | |
| int | capacity () |
| Returns this buffer's element capacity. More... | |
| int | position () |
| Returns this buffer's element position. More... | |
| B | position (int newPos) |
| Sets this buffer's element position. More... | |
| int | remaining () |
| Returns this buffer's remaining element, i.e. More... | |
| boolean | hasRemaining () |
Returns remaining() > 0. More... | |
| B | clear () |
| Sets the limit to the capacity and the position to zero. More... | |
| B | flip () |
| Sets the limit to the current position and the position to zero. More... | |
| B | rewind () |
| Sets the position to zero. More... | |
| boolean | hasArray () |
| int | arrayOffset () |
| Object | array () throws UnsupportedOperationException |
| Buffer | getBuffer () |
| Returns the underlying buffer object. More... | |
| boolean | isDirect () |
| Return true if the underlying buffer is NIO direct, otherwise false. More... | |
| long | getDirectBufferAddress () |
Returns the native address of the underlying buffer if isDirect(), otherwise 0. More... | |
| void | storeDirectAddress (final ByteBuffer directDest) |
Store the getDirectBufferAddress() into the given ByteBuffer using relative put. More... | |
| void | storeDirectAddress (final ByteBuffer directDest, final int destOffset) |
Store the getDirectBufferAddress() into the given ByteBuffer using absolute put. More... | |
| B | put (B src) |
| Relative bulk get method. More... | |
Hardware independent container for various kinds of buffers.
Implementations follow Buffer semantics, e.g.
0 <= position <= limit <= capacity
Definition at line 49 of file NativeBuffer.java.
| Object com.jogamp.common.nio.NativeBuffer< B extends NativeBuffer >.array | ( | ) | throws UnsupportedOperationException |
hasArray() is true, otherwise it throws java.lang.UnsupportedOperationException. The returned primitive array maybe of type int[] or long[], etc .. | UnsupportedOperationException | if this object has no backup array |
| int com.jogamp.common.nio.NativeBuffer< B extends NativeBuffer >.arrayOffset | ( | ) |
hasArray() is true, otherwise 0. | int com.jogamp.common.nio.NativeBuffer< B extends NativeBuffer >.capacity | ( | ) |
Returns this buffer's element capacity.
| B com.jogamp.common.nio.NativeBuffer< B extends NativeBuffer >.clear | ( | ) |
Sets the limit to the capacity and the position to zero.
| int com.jogamp.common.nio.NativeBuffer< B extends NativeBuffer >.elementSize | ( | ) |
Returns byte size of one element.
| B com.jogamp.common.nio.NativeBuffer< B extends NativeBuffer >.flip | ( | ) |
Sets the limit to the current position and the position to zero.
| Buffer com.jogamp.common.nio.NativeBuffer< B extends NativeBuffer >.getBuffer | ( | ) |
Returns the underlying buffer object.
| long com.jogamp.common.nio.NativeBuffer< B extends NativeBuffer >.getDirectBufferAddress | ( | ) |
Returns the native address of the underlying buffer if isDirect(), otherwise 0.
| boolean com.jogamp.common.nio.NativeBuffer< B extends NativeBuffer >.hasArray | ( | ) |
| boolean com.jogamp.common.nio.NativeBuffer< B extends NativeBuffer >.hasRemaining | ( | ) |
Returns remaining() > 0.
| boolean com.jogamp.common.nio.NativeBuffer< B extends NativeBuffer >.isDirect | ( | ) |
Return true if the underlying buffer is NIO direct, otherwise false.
| int com.jogamp.common.nio.NativeBuffer< B extends NativeBuffer >.limit | ( | ) |
Returns this buffer's element limit.
| B com.jogamp.common.nio.NativeBuffer< B extends NativeBuffer >.limit | ( | int | newLim | ) |
Sets this buffer's element limit.
| int com.jogamp.common.nio.NativeBuffer< B extends NativeBuffer >.position | ( | ) |
Returns this buffer's element position.
| B com.jogamp.common.nio.NativeBuffer< B extends NativeBuffer >.position | ( | int | newPos | ) |
Sets this buffer's element position.
| B com.jogamp.common.nio.NativeBuffer< B extends NativeBuffer >.put | ( | B | src | ) |
Relative bulk get method.
Copy the source values src[position .. capacity] [ to this buffer and increment the position by capacity-position.
| int com.jogamp.common.nio.NativeBuffer< B extends NativeBuffer >.remaining | ( | ) |
Returns this buffer's remaining element, i.e.
limit - position.
| B com.jogamp.common.nio.NativeBuffer< B extends NativeBuffer >.rewind | ( | ) |
Sets the position to zero.
| void com.jogamp.common.nio.NativeBuffer< B extends NativeBuffer >.storeDirectAddress | ( | final ByteBuffer | directDest | ) |
Store the getDirectBufferAddress() into the given ByteBuffer using relative put.
The native pointer value is stored either as a 32bit (int) or 64bit (long) wide value, depending of the CPU pointer width.
| void com.jogamp.common.nio.NativeBuffer< B extends NativeBuffer >.storeDirectAddress | ( | final ByteBuffer | directDest, |
| final int | destOffset | ||
| ) |
Store the getDirectBufferAddress() into the given ByteBuffer using absolute put.
The native pointer value is stored either as a 32bit (int) or 64bit (long) wide value, depending of the CPU pointer width.