|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.nio.Buffer
java.nio.FloatBuffer
java.nio.FloatArrayBuffer
abstract class FloatArrayBuffer
FloatArrayBuffer, ReadWriteFloatArrayBuffer and ReadOnlyFloatArrayBuffer compose the implementation of array based float buffers.
FloatArrayBuffer implements all the shared readonly methods and is extended by the other two classes.
All methods are marked final for runtime performance.
| Field Summary | |
|---|---|
protected float[] |
backingArray
|
protected int |
offset
|
| Fields inherited from class java.nio.Buffer |
|---|
_elementSizeShift, capacity, limit, mark, position, UNSET_MARK |
| Constructor Summary | |
|---|---|
FloatArrayBuffer(float[] array)
|
|
FloatArrayBuffer(int capacity)
|
|
FloatArrayBuffer(int capacity,
float[] backingArray,
int offset)
|
|
| Method Summary | |
|---|---|
float |
get()
Returns the float at the current position and increase the position by 1. |
FloatBuffer |
get(float[] dest,
int off,
int len)
Reads floats from the current position into the specified
float array, starting from the specified offset, and increase the
position by the number of floats read. |
float |
get(int index)
Returns a float at the specified index, and the position is not changed. |
boolean |
isDirect()
Returns true if this buffer is direct. |
ByteOrder |
order()
Returns the byte order used by this buffer when converting floats from/to bytes. |
| Methods inherited from class java.nio.FloatBuffer |
|---|
_array, _arrayOffset, allocate, array, arrayOffset, asReadOnlyBuffer, compact, compareTo, duplicate, equals, get, hasArray, hashCode, protectedArray, protectedArrayOffset, protectedHasArray, put, put, put, put, put, slice, toString, wrap, wrap |
| Methods inherited from class java.nio.Buffer |
|---|
capacity, clear, flip, hasRemaining, isReadOnly, limit, limit, mark, position, position, remaining, reset, rewind |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final float[] backingArray
protected final int offset
| Constructor Detail |
|---|
FloatArrayBuffer(float[] array)
FloatArrayBuffer(int capacity)
FloatArrayBuffer(int capacity,
float[] backingArray,
int offset)
| Method Detail |
|---|
public final float get()
FloatBuffer
get in class FloatBufferpublic final float get(int index)
FloatBuffer
get in class FloatBufferindex - The index, must be no less than zero and less than limit
public final FloatBuffer get(float[] dest,
int off,
int len)
FloatBufferfloats from the current position into the specified
float array, starting from the specified offset, and increase the
position by the number of floats read.
get in class FloatBufferdest - The target float arrayoff - The offset of the float array, must be no less than zero and
no greater than dest.lengthlen - The number of floats to read, must be no less
than zero and no greater than dest.length - off
public final boolean isDirect()
FloatBufferA direct buffer will try its best to take advantage of native memory APIs and it may not stay in java heap, thus not affected by GC.
A float buffer is direct, if it is based on a byte buffer and the byte buffer is direct.
isDirect in class FloatBufferpublic final ByteOrder order()
FloatBufferfloats from/to bytes.
If this buffer is not based on a byte buffer, then always return the platform's native byte order.
order in class FloatBufferfloats from/to bytes.
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||