aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen/runtime/PointerBuffer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/jogamp/gluegen/runtime/PointerBuffer.java')
-rw-r--r--src/java/com/jogamp/gluegen/runtime/PointerBuffer.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/java/com/jogamp/gluegen/runtime/PointerBuffer.java b/src/java/com/jogamp/gluegen/runtime/PointerBuffer.java
index a89dace..0adbb36 100644
--- a/src/java/com/jogamp/gluegen/runtime/PointerBuffer.java
+++ b/src/java/com/jogamp/gluegen/runtime/PointerBuffer.java
@@ -156,4 +156,18 @@ public abstract class PointerBuffer {
public abstract PointerBuffer put(long value);
+ public PointerBuffer put(PointerBuffer src) {
+ if (remaining() < src.remaining()) {
+ throw new IndexOutOfBoundsException();
+ }
+ while (src.hasRemaining()) {
+ put(src.get());
+ }
+ return this;
+ }
+
+ public String toString() {
+ return "PointerBuffer[capacity "+capacity+", position "+position+", elementSize "+elementSize()+", ByteBuffer.capacity "+bb.capacity()+"]";
+ }
+
}