summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/jogamp')
-rw-r--r--src/java/com/jogamp/gluegen/runtime/Int64Buffer.java14
-rw-r--r--src/java/com/jogamp/gluegen/runtime/PointerBuffer.java14
2 files changed, 28 insertions, 0 deletions
diff --git a/src/java/com/jogamp/gluegen/runtime/Int64Buffer.java b/src/java/com/jogamp/gluegen/runtime/Int64Buffer.java
index 5f7cc33..98d0834 100644
--- a/src/java/com/jogamp/gluegen/runtime/Int64Buffer.java
+++ b/src/java/com/jogamp/gluegen/runtime/Int64Buffer.java
@@ -152,4 +152,18 @@ public abstract class Int64Buffer {
public abstract Int64Buffer put(long value);
+ public Int64Buffer put(Int64Buffer src) {
+ if (remaining() < src.remaining()) {
+ throw new IndexOutOfBoundsException();
+ }
+ while (src.hasRemaining()) {
+ put(src.get());
+ }
+ return this;
+ }
+
+ public String toString() {
+ return "Int64Buffer[capacity "+capacity+", position "+position+", elementSize "+elementSize()+", ByteBuffer.capacity "+bb.capacity()+"]";
+ }
+
}
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()+"]";
+ }
+
}