class BufferFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static boolean |
isLittleEndian |
(package private) static int |
SIZEOF_BYTE |
(package private) static int |
SIZEOF_CHAR |
(package private) static int |
SIZEOF_DOUBLE |
(package private) static int |
SIZEOF_FLOAT |
(package private) static int |
SIZEOF_INT |
(package private) static int |
SIZEOF_LONG |
(package private) static int |
SIZEOF_SHORT |
Constructor and Description |
---|
BufferFactory() |
Modifier and Type | Method and Description |
---|---|
(package private) static java.lang.Object |
getArray(java.lang.Object buf)
Helper routine to return the array backing store reference from
a Buffer object.
|
(package private) 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.
|
(package private) 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.
|
(package private) static boolean |
isDirect(java.lang.Object buf)
Helper routine to tell whether a buffer is direct or not.
|
(package private) static boolean |
isLittleEndian() |
(package private) 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.
|
(package private) static java.nio.ByteBuffer |
newDirectByteBuffer(int size)
Helper routine to create a direct ByteBuffer with native order
|
static final int SIZEOF_BYTE
static final int SIZEOF_SHORT
static final int SIZEOF_CHAR
static final int SIZEOF_INT
static final int SIZEOF_FLOAT
static final int SIZEOF_LONG
static final int SIZEOF_DOUBLE
private static final boolean isLittleEndian
static boolean isLittleEndian()
static java.nio.ByteBuffer newDirectByteBuffer(int size)
static java.nio.ByteBuffer nativeOrder(java.nio.ByteBuffer buf)
static boolean isDirect(java.lang.Object buf)
static int getDirectBufferByteOffset(java.lang.Object buf)
static java.lang.Object getArray(java.lang.Object buf)
static int getIndirectBufferByteOffset(java.lang.Object buf)