|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jogamp.common.nio.Buffers
public class Buffers
Field Summary | |
---|---|
static int |
SIZEOF_BYTE
|
static int |
SIZEOF_CHAR
|
static int |
SIZEOF_DOUBLE
|
static int |
SIZEOF_FLOAT
|
static int |
SIZEOF_INT
|
static int |
SIZEOF_LONG
|
static int |
SIZEOF_SHORT
|
Constructor Summary | |
---|---|
protected |
Buffers()
|
Method Summary | |
---|---|
static java.nio.ByteBuffer |
copyByteBuffer(java.nio.ByteBuffer orig)
Copies the remaining elements (as defined by limit() - position() ) in the passed ByteBuffer into
a newly-allocated direct ByteBuffer. |
static java.nio.FloatBuffer |
copyFloatBuffer(java.nio.FloatBuffer orig)
Copies the remaining elements (as defined by limit() - position() ) in the passed FloatBuffer
into a newly-allocated direct FloatBuffer. |
static java.nio.ByteBuffer |
copyFloatBufferAsByteBuffer(java.nio.FloatBuffer orig)
Copies the remaining elements (as defined by limit() - position() ) in the passed FloatBuffer
into a newly-allocated direct ByteBuffer. |
static java.nio.IntBuffer |
copyIntBuffer(java.nio.IntBuffer orig)
Copies the remaining elements (as defined by limit() - position() ) in the passed IntBuffer
into a newly-allocated direct IntBuffer. |
static java.nio.ByteBuffer |
copyIntBufferAsByteBuffer(java.nio.IntBuffer orig)
Copies the remaining elements (as defined by limit() - position() ) in the passed IntBuffer into
a newly-allocated direct ByteBuffer. |
static java.nio.ShortBuffer |
copyShortBuffer(java.nio.ShortBuffer orig)
Copies the remaining elements (as defined by limit() - position() ) in the passed ShortBuffer
into a newly-allocated direct ShortBuffer. |
static java.nio.ByteBuffer |
copyShortBufferAsByteBuffer(java.nio.ShortBuffer orig)
Copies the remaining elements (as defined by limit() - position() ) in the passed ShortBuffer
into a newly-allocated direct ByteBuffer. |
static java.lang.Object |
getArray(java.lang.Object buf)
Helper routine to return the array backing store reference from a Buffer object. |
static int |
getDirectBufferByteOffset(java.lang.Object buf)
Helper routine to get the Buffer byte offset by taking into account the Buffer position and the underlying type. |
static java.nio.FloatBuffer |
getFloatBuffer(java.nio.DoubleBuffer source)
|
static int |
getIndirectBufferByteOffset(java.lang.Object buf)
Helper routine to get the full byte offset from the beginning of the array that is the storage for the indirect Buffer object. |
static boolean |
isDirect(java.lang.Object buf)
Helper routine to tell whether a buffer is direct or not. |
static java.nio.ByteBuffer |
nativeOrder(java.nio.ByteBuffer buf)
Helper routine to set a ByteBuffer to the native byte order, if that operation is supported by the underlying NIO implementation. |
static java.nio.ByteBuffer |
newDirectByteBuffer(byte[] values)
|
static java.nio.ByteBuffer |
newDirectByteBuffer(byte[] values,
int offset)
|
static java.nio.ByteBuffer |
newDirectByteBuffer(byte[] values,
int offset,
int lenght)
|
static java.nio.ByteBuffer |
newDirectByteBuffer(int numElements)
Allocates a new direct ByteBuffer with the specified number of elements. |
static java.nio.CharBuffer |
newDirectCharBuffer(char[] values)
|
static java.nio.CharBuffer |
newDirectCharBuffer(char[] values,
int offset)
|
static java.nio.CharBuffer |
newDirectCharBuffer(char[] values,
int offset,
int lenght)
|
static java.nio.CharBuffer |
newDirectCharBuffer(int numElements)
Allocates a new direct CharBuffer with the specified number of elements. |
static java.nio.DoubleBuffer |
newDirectDoubleBuffer(double[] values)
|
static java.nio.DoubleBuffer |
newDirectDoubleBuffer(double[] values,
int offset)
|
static java.nio.DoubleBuffer |
newDirectDoubleBuffer(double[] values,
int offset,
int lenght)
|
static java.nio.DoubleBuffer |
newDirectDoubleBuffer(int numElements)
Allocates a new direct DoubleBuffer with the specified number of elements. |
static java.nio.FloatBuffer |
newDirectFloatBuffer(float[] values)
|
static java.nio.FloatBuffer |
newDirectFloatBuffer(float[] values,
int offset)
|
static java.nio.FloatBuffer |
newDirectFloatBuffer(float[] values,
int offset,
int lenght)
|
static java.nio.FloatBuffer |
newDirectFloatBuffer(int numElements)
Allocates a new direct FloatBuffer with the specified number of elements. |
static java.nio.IntBuffer |
newDirectIntBuffer(int numElements)
Allocates a new direct IntBuffer with the specified number of elements. |
static java.nio.IntBuffer |
newDirectIntBuffer(int[] values)
|
static java.nio.IntBuffer |
newDirectIntBuffer(int[] values,
int offset)
|
static java.nio.IntBuffer |
newDirectIntBuffer(int[] values,
int offset,
int lenght)
|
static java.nio.LongBuffer |
newDirectLongBuffer(int numElements)
Allocates a new direct LongBuffer with the specified number of elements. |
static java.nio.LongBuffer |
newDirectLongBuffer(long[] values)
|
static java.nio.LongBuffer |
newDirectLongBuffer(long[] values,
int offset)
|
static java.nio.LongBuffer |
newDirectLongBuffer(long[] values,
int offset,
int lenght)
|
static java.nio.ShortBuffer |
newDirectShortBuffer(int numElements)
Allocates a new direct ShortBuffer with the specified number of elements. |
static java.nio.ShortBuffer |
newDirectShortBuffer(short[] values)
|
static java.nio.ShortBuffer |
newDirectShortBuffer(short[] values,
int offset)
|
static java.nio.ShortBuffer |
newDirectShortBuffer(short[] values,
int offset,
int lenght)
|
static java.nio.Buffer |
put(java.nio.Buffer dest,
java.nio.Buffer src)
|
static java.nio.Buffer |
putb(java.nio.Buffer dest,
byte v)
|
static void |
putd(java.nio.Buffer dest,
double v)
|
static void |
putf(java.nio.Buffer dest,
float v)
|
static void |
puti(java.nio.Buffer dest,
int v)
|
static java.nio.Buffer |
puts(java.nio.Buffer dest,
short v)
|
static void |
rangeCheck(java.nio.Buffer buffer,
int minElementsRemaining)
|
static void |
rangeCheck(byte[] array,
int offset,
int minElementsRemaining)
|
static void |
rangeCheck(char[] array,
int offset,
int minElementsRemaining)
|
static void |
rangeCheck(double[] array,
int offset,
int minElementsRemaining)
|
static void |
rangeCheck(float[] array,
int offset,
int minElementsRemaining)
|
static void |
rangeCheck(int[] array,
int offset,
int minElementsRemaining)
|
static void |
rangeCheck(long[] array,
int offset,
int minElementsRemaining)
|
static void |
rangeCheck(short[] array,
int offset,
int minElementsRemaining)
|
static void |
rangeCheckBytes(java.lang.Object buffer,
int minBytesRemaining)
|
static int |
sizeOfBufferElem(java.nio.Buffer buffer)
Returns the size of a single element of this buffer in bytes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SIZEOF_BYTE
public static final int SIZEOF_SHORT
public static final int SIZEOF_CHAR
public static final int SIZEOF_INT
public static final int SIZEOF_FLOAT
public static final int SIZEOF_LONG
public static final int SIZEOF_DOUBLE
Constructor Detail |
---|
protected Buffers()
Method Detail |
---|
public static java.nio.ByteBuffer newDirectByteBuffer(int numElements)
public static java.nio.ByteBuffer newDirectByteBuffer(byte[] values, int offset, int lenght)
public static java.nio.ByteBuffer newDirectByteBuffer(byte[] values, int offset)
public static java.nio.ByteBuffer newDirectByteBuffer(byte[] values)
public static java.nio.DoubleBuffer newDirectDoubleBuffer(int numElements)
public static java.nio.DoubleBuffer newDirectDoubleBuffer(double[] values, int offset, int lenght)
public static java.nio.DoubleBuffer newDirectDoubleBuffer(double[] values, int offset)
public static java.nio.DoubleBuffer newDirectDoubleBuffer(double[] values)
public static java.nio.FloatBuffer newDirectFloatBuffer(int numElements)
public static java.nio.FloatBuffer newDirectFloatBuffer(float[] values, int offset, int lenght)
public static java.nio.FloatBuffer newDirectFloatBuffer(float[] values, int offset)
public static java.nio.FloatBuffer newDirectFloatBuffer(float[] values)
public static java.nio.IntBuffer newDirectIntBuffer(int numElements)
public static java.nio.IntBuffer newDirectIntBuffer(int[] values, int offset, int lenght)
public static java.nio.IntBuffer newDirectIntBuffer(int[] values, int offset)
public static java.nio.IntBuffer newDirectIntBuffer(int[] values)
public static java.nio.LongBuffer newDirectLongBuffer(int numElements)
public static java.nio.LongBuffer newDirectLongBuffer(long[] values, int offset, int lenght)
public static java.nio.LongBuffer newDirectLongBuffer(long[] values, int offset)
public static java.nio.LongBuffer newDirectLongBuffer(long[] values)
public static java.nio.ShortBuffer newDirectShortBuffer(int numElements)
public static java.nio.ShortBuffer newDirectShortBuffer(short[] values, int offset, int lenght)
public static java.nio.ShortBuffer newDirectShortBuffer(short[] values, int offset)
public static java.nio.ShortBuffer newDirectShortBuffer(short[] values)
public static java.nio.CharBuffer newDirectCharBuffer(int numElements)
public static java.nio.CharBuffer newDirectCharBuffer(char[] values, int offset, int lenght)
public static java.nio.CharBuffer newDirectCharBuffer(char[] values, int offset)
public static java.nio.CharBuffer newDirectCharBuffer(char[] values)
public static java.nio.ByteBuffer nativeOrder(java.nio.ByteBuffer buf)
public static final int sizeOfBufferElem(java.nio.Buffer buffer)
public static boolean isDirect(java.lang.Object buf)
public static int getDirectBufferByteOffset(java.lang.Object buf)
public static java.lang.Object getArray(java.lang.Object buf)
public static int getIndirectBufferByteOffset(java.lang.Object buf)
public static java.nio.ByteBuffer copyByteBuffer(java.nio.ByteBuffer orig)
limit() - position()
) in the passed ByteBuffer into
a newly-allocated direct ByteBuffer. The returned buffer will
have its byte order set to the host platform's native byte
order. The position of the newly-allocated buffer will be zero,
and the position of the passed buffer is unchanged (though its
mark is changed).
public static java.nio.FloatBuffer copyFloatBuffer(java.nio.FloatBuffer orig)
limit() - position()
) in the passed FloatBuffer
into a newly-allocated direct FloatBuffer. The returned buffer
will have its byte order set to the host platform's native byte
order. The position of the newly-allocated buffer will be zero,
and the position of the passed buffer is unchanged (though its
mark is changed).
public static java.nio.IntBuffer copyIntBuffer(java.nio.IntBuffer orig)
limit() - position()
) in the passed IntBuffer
into a newly-allocated direct IntBuffer. The returned buffer
will have its byte order set to the host platform's native byte
order. The position of the newly-allocated buffer will be zero,
and the position of the passed buffer is unchanged (though its
mark is changed).
public static java.nio.ShortBuffer copyShortBuffer(java.nio.ShortBuffer orig)
limit() - position()
) in the passed ShortBuffer
into a newly-allocated direct ShortBuffer. The returned buffer
will have its byte order set to the host platform's native byte
order. The position of the newly-allocated buffer will be zero,
and the position of the passed buffer is unchanged (though its
mark is changed).
public static java.nio.ByteBuffer copyFloatBufferAsByteBuffer(java.nio.FloatBuffer orig)
limit() - position()
) in the passed FloatBuffer
into a newly-allocated direct ByteBuffer. The returned buffer
will have its byte order set to the host platform's native byte
order. The position of the newly-allocated buffer will be zero,
and the position of the passed buffer is unchanged (though its
mark is changed).
public static java.nio.ByteBuffer copyIntBufferAsByteBuffer(java.nio.IntBuffer orig)
limit() - position()
) in the passed IntBuffer into
a newly-allocated direct ByteBuffer. The returned buffer will
have its byte order set to the host platform's native byte
order. The position of the newly-allocated buffer will be zero,
and the position of the passed buffer is unchanged (though its
mark is changed).
public static java.nio.ByteBuffer copyShortBufferAsByteBuffer(java.nio.ShortBuffer orig)
limit() - position()
) in the passed ShortBuffer
into a newly-allocated direct ByteBuffer. The returned buffer
will have its byte order set to the host platform's native byte
order. The position of the newly-allocated buffer will be zero,
and the position of the passed buffer is unchanged (though its
mark is changed).
public static final java.nio.FloatBuffer getFloatBuffer(java.nio.DoubleBuffer source)
public static java.nio.Buffer put(java.nio.Buffer dest, java.nio.Buffer src)
public static java.nio.Buffer putb(java.nio.Buffer dest, byte v)
public static java.nio.Buffer puts(java.nio.Buffer dest, short v)
public static void puti(java.nio.Buffer dest, int v)
public static void putf(java.nio.Buffer dest, float v)
public static void putd(java.nio.Buffer dest, double v)
public static void rangeCheck(byte[] array, int offset, int minElementsRemaining)
public static void rangeCheck(char[] array, int offset, int minElementsRemaining)
public static void rangeCheck(short[] array, int offset, int minElementsRemaining)
public static void rangeCheck(int[] array, int offset, int minElementsRemaining)
public static void rangeCheck(long[] array, int offset, int minElementsRemaining)
public static void rangeCheck(float[] array, int offset, int minElementsRemaining)
public static void rangeCheck(double[] array, int offset, int minElementsRemaining)
public static void rangeCheck(java.nio.Buffer buffer, int minElementsRemaining)
public static void rangeCheckBytes(java.lang.Object buffer, int minBytesRemaining)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |