summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/nio/NativeBuffer.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-03-31 23:32:39 +0200
committerSven Gothel <[email protected]>2010-03-31 23:32:39 +0200
commite37c383c4a09432fff009e81d572c8a92b42eef6 (patch)
tree9ebb8bacc940a3460be1639ad771f8e5d98ad012 /src/java/com/jogamp/common/nio/NativeBuffer.java
parent73829c38665c57052bf703ae58a2bd1dc7dc4625 (diff)
parent22262166e07de99ae0d4557e4f87e3bd1c5cd6dd (diff)
Merged with latest of mbien
Diffstat (limited to 'src/java/com/jogamp/common/nio/NativeBuffer.java')
-rw-r--r--src/java/com/jogamp/common/nio/NativeBuffer.java54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/java/com/jogamp/common/nio/NativeBuffer.java b/src/java/com/jogamp/common/nio/NativeBuffer.java
new file mode 100644
index 0000000..99a5cbc
--- /dev/null
+++ b/src/java/com/jogamp/common/nio/NativeBuffer.java
@@ -0,0 +1,54 @@
+/*
+ * Created on Tuesday, March 30 2010 18:22
+ */
+package com.jogamp.common.nio;
+
+import java.nio.ByteBuffer;
+
+/**
+ * Hardware independent container for various kinds of buffers.
+ *
+ * @author Michael Bien
+ * @author Sven Gothel
+ */
+public interface NativeBuffer/*<B extends NativeBuffer>*/ {
+
+ public int limit();
+
+ public int capacity();
+
+ public int position();
+
+ public NativeBuffer position(int newPos);
+
+ public int remaining();
+
+ public boolean hasRemaining();
+
+ public NativeBuffer rewind();
+
+ public boolean hasArray();
+
+ public int arrayOffset();
+
+ public ByteBuffer getBuffer();
+
+ public boolean isDirect();
+
+/*
+ public long[] array();
+
+ public B rewind();
+
+ public B put(int index, long value);
+
+ public B put(long value);
+
+ public B put(B src);
+
+ public long get();
+
+ public long get(int idx);
+*/
+
+}