| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static ByteBuffer | Returns: a ByteBufferThe size, in bytes size)Construct a direct native-ordered bytebuffer with the specified size. |
| public static CharBuffer | Returns: an CharBufferThe size, in chars size)Construct a direct native-order charbuffer with the specified number of elements. |
| public static DoubleBuffer | Returns: a FloatBufferThe size, in floats size)Construct a direct native-order doublebuffer with the specified number of elements. |
| public static FloatBuffer | Returns: a FloatBufferThe size, in floats size)Construct a direct native-order floatbuffer with the specified number of elements. |
| public static IntBuffer | Returns: an IntBufferThe size, in ints size)Construct a direct native-order intbuffer with the specified number of elements. |
| public static LongBuffer | Returns: an LongBufferThe size, in longs size)Construct a direct native-order longbuffer with the specified number of elements. |
| public static PointerBuffer | Returns: a PointerBufferThe size, in memory addresses size)Construct a PointerBuffer with the specified number of elements. |
| public static ShortBuffer | Returns: a ShortBufferThe size, in shorts size)Construct a direct native-order shortbuffer with the specified number of elements. |
| pack-priv static native long | Returns: the memory addressthe buffer buffer)Returns the memory address of the specified buffer. |
| public static int | |
| public static int | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| private static native void |
| BufferUtils | back to summary |
|---|---|
| public BufferUtils() | |
| createByteBuffer | back to summary |
|---|---|
| public static ByteBuffer createByteBuffer(int size) Construct a direct native-ordered bytebuffer with the specified size.
| |
| createCharBuffer | back to summary |
|---|---|
| public static CharBuffer createCharBuffer(int size) Construct a direct native-order charbuffer with the specified number of elements.
| |
| createDoubleBuffer | back to summary |
|---|---|
| public static DoubleBuffer createDoubleBuffer(int size) Construct a direct native-order doublebuffer with the specified number of elements.
| |
| createFloatBuffer | back to summary |
|---|---|
| public static FloatBuffer createFloatBuffer(int size) Construct a direct native-order floatbuffer with the specified number of elements.
| |
| createIntBuffer | back to summary |
|---|---|
| public static IntBuffer createIntBuffer(int size) Construct a direct native-order intbuffer with the specified number of elements.
| |
| createLongBuffer | back to summary |
|---|---|
| public static LongBuffer createLongBuffer(int size) Construct a direct native-order longbuffer with the specified number of elements.
| |
| createPointerBuffer | back to summary |
|---|---|
| public static PointerBuffer createPointerBuffer(int size) Construct a PointerBuffer with the specified number of elements.
| |
| createShortBuffer | back to summary |
|---|---|
| public static ShortBuffer createShortBuffer(int size) Construct a direct native-order shortbuffer with the specified number of elements.
| |
| getBufferAddress | back to summary |
|---|---|
| pack-priv static native long getBufferAddress(Buffer buffer) Returns the memory address of the specified buffer.
| |
| getElementSizeExponent | back to summary |
|---|---|
public static int getElementSizeExponent(Buffer buf)
| |
| getOffset | back to summary |
|---|---|
| public static int getOffset(Buffer buffer) A helper function which is used to get the byte offset in an arbitrary buffer based on its position
| |
| zeroBuffer | back to summary |
|---|---|
| public static void zeroBuffer(ByteBuffer b) Fill buffer with zeros from position to remaining | |
| zeroBuffer | back to summary |
|---|---|
| public static void zeroBuffer(ShortBuffer b) Fill buffer with zeros from position to remaining | |
| zeroBuffer | back to summary |
|---|---|
| public static void zeroBuffer(CharBuffer b) Fill buffer with zeros from position to remaining | |
| zeroBuffer | back to summary |
|---|---|
| public static void zeroBuffer(IntBuffer b) Fill buffer with zeros from position to remaining | |
| zeroBuffer | back to summary |
|---|---|
| public static void zeroBuffer(FloatBuffer b) Fill buffer with zeros from position to remaining | |
| zeroBuffer | back to summary |
|---|---|
| public static void zeroBuffer(LongBuffer b) Fill buffer with zeros from position to remaining | |
| zeroBuffer | back to summary |
|---|---|
| public static void zeroBuffer(DoubleBuffer b) Fill buffer with zeros from position to remaining | |
| zeroBuffer0 | back to summary |
|---|---|
| private static native void zeroBuffer0(Buffer b, long off, long size) Fill buffer with zeros from position to remaining | |