com.jogamp.common.nio
Class AbstractBuffer

java.lang.Object
  extended by com.jogamp.common.nio.AbstractBuffer
All Implemented Interfaces:
NativeBuffer
Direct Known Subclasses:
AbstractLongBuffer

public abstract class AbstractBuffer
extends Object
implements NativeBuffer

Author:
Michael Bien, Sven Gothel

Field Summary
protected  ByteBuffer bb
           
protected  int capacity
           
protected  int position
           
 
Constructor Summary
protected AbstractBuffer(ByteBuffer bb, int elementSize)
           
 
Method Summary
 int arrayOffset()
           
 int capacity()
           
 ByteBuffer getBuffer()
           
 boolean hasArray()
           
 boolean hasRemaining()
           
 boolean isDirect()
           
 int limit()
           
 int position()
           
 NativeBuffer position(int newPos)
           
 int remaining()
           
 NativeBuffer rewind()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bb

protected final ByteBuffer bb

capacity

protected int capacity

position

protected int position
Constructor Detail

AbstractBuffer

protected AbstractBuffer(ByteBuffer bb,
                         int elementSize)
Method Detail

limit

public final int limit()
Specified by:
limit in interface NativeBuffer

capacity

public final int capacity()
Specified by:
capacity in interface NativeBuffer

position

public final int position()
Specified by:
position in interface NativeBuffer

position

public final NativeBuffer position(int newPos)
Specified by:
position in interface NativeBuffer

remaining

public final int remaining()
Specified by:
remaining in interface NativeBuffer

hasRemaining

public final boolean hasRemaining()
Specified by:
hasRemaining in interface NativeBuffer

rewind

public final NativeBuffer rewind()
Specified by:
rewind in interface NativeBuffer

hasArray

public boolean hasArray()
Specified by:
hasArray in interface NativeBuffer

arrayOffset

public int arrayOffset()
Specified by:
arrayOffset in interface NativeBuffer

getBuffer

public final ByteBuffer getBuffer()
Specified by:
getBuffer in interface NativeBuffer

isDirect

public final boolean isDirect()
Specified by:
isDirect in interface NativeBuffer

toString

public String toString()
Overrides:
toString in class Object