public class J3DBuffer
extends java.lang.Object
rewind on the read-only view, so that elements 0
through buffer.limit()-1 will be available internally.GeometryArray.setCoordRefBuffer(J3DBuffer),
GeometryArray.setColorRefBuffer(J3DBuffer),
GeometryArray.setNormalRefBuffer(J3DBuffer),
GeometryArray.setTexCoordRefBuffer(int,J3DBuffer),
GeometryArray.setVertexAttrRefBuffer(int,J3DBuffer),
GeometryArray.setInterleavedVertexBuffer(J3DBuffer),
CompressedGeometry.CompressedGeometry(CompressedGeometryHeader,J3DBuffer)| Modifier and Type | Field and Description |
|---|---|
private BufferWrapper |
bufferImpl |
private int |
bufferType |
private java.nio.Buffer |
originalBuffer |
(package private) static int |
TYPE_BYTE |
(package private) static int |
TYPE_CHAR |
(package private) static int |
TYPE_DOUBLE |
(package private) static int |
TYPE_FLOAT |
(package private) static int |
TYPE_INT |
(package private) static int |
TYPE_LONG |
(package private) static int |
TYPE_NULL |
(package private) static int |
TYPE_SHORT |
(package private) static int |
TYPE_UNKNOWN |
(package private) static boolean |
unsupportedOperation |
| Constructor and Description |
|---|
J3DBuffer()
Constructs a J3DBuffer object and initializes it with
a null NIO buffer object.
|
J3DBuffer(java.nio.Buffer buffer)
Constructs a J3DBuffer object and initializes it with
the specified NIO buffer object.
|
| Modifier and Type | Method and Description |
|---|---|
private static boolean |
checkNativeBufferAccess(java.nio.Buffer buffer) |
java.nio.Buffer |
getBuffer()
Retrieves the NIO buffer object from this J3DBuffer.
|
(package private) BufferWrapper |
getBufferImpl() |
(package private) int |
getBufferType() |
void |
setBuffer(java.nio.Buffer buffer)
Sets the NIO buffer object in this J3DBuffer to
the specified object.
|
static final int TYPE_NULL
static final int TYPE_UNKNOWN
static final int TYPE_BYTE
static final int TYPE_CHAR
static final int TYPE_SHORT
static final int TYPE_INT
static final int TYPE_LONG
static final int TYPE_FLOAT
static final int TYPE_DOUBLE
static boolean unsupportedOperation
private java.nio.Buffer originalBuffer
private BufferWrapper bufferImpl
private int bufferType
public J3DBuffer()
java.lang.UnsupportedOperationException - if the JVM does not
support native access to direct NIO bufferspublic J3DBuffer(java.nio.Buffer buffer)
buffer - the NIO buffer wrapped by this J3DBufferjava.lang.UnsupportedOperationException - if the JVM does not
support native access to direct NIO buffersjava.lang.IllegalArgumentException - if the specified buffer is
not a direct buffer, or if the byte order of the specified
buffer does not match the native byte order of the underlying
platform.public void setBuffer(java.nio.Buffer buffer)
buffer - the NIO buffer wrapped by this J3DBufferjava.lang.IllegalArgumentException - if the specified buffer is
not a direct buffer, or if the byte order of the specified
buffer does not match the native byte order of the underlying
platform.public java.nio.Buffer getBuffer()
int getBufferType()
BufferWrapper getBufferImpl()
private static boolean checkNativeBufferAccess(java.nio.Buffer buffer)
Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.