java.nio
Class FloatBufferImpl

java.lang.Object
java.nio.Buffer
java.nio.FloatBuffer
java.nio.FloatBufferImpl
- All Implemented Interfaces:
- java.lang.Comparable
- final class FloatBufferImpl
- extends FloatBuffer
This is a Heap memory implementation
|
Constructor Summary |
(package private) |
FloatBufferImpl(float[] buffer,
int offset,
int capacity,
int limit,
int position,
int mark,
boolean readOnly)
|
(package private) |
FloatBufferImpl(int capacity)
|
|
Method Summary |
FloatBuffer |
asReadOnlyBuffer()
Creates a new read-only FloatBuffer that shares this
buffer's content. |
FloatBuffer |
compact()
Compacts this buffer. |
FloatBuffer |
duplicate()
Creates a new FloatBuffer that shares this buffer's
content. |
float |
get()
Reads the float at this buffer's current position,
and then increments the position. |
float |
get(int index)
Absolute get method. |
boolean |
isDirect()
Tells wether or not this buffer is direct. |
boolean |
isReadOnly()
Tells whether this buffer is read only or not. |
ByteOrder |
order()
Returns the byte order of this buffer. |
FloatBuffer |
put(float value)
Relative put method. |
FloatBuffer |
put(int index,
float value)
Absolute put method. |
FloatBuffer |
slice()
Creates a new FloatBuffer whose content is a shared
subsequence of this buffer's content. |
| Methods inherited from class java.nio.FloatBuffer |
allocate, array, arrayOffset, compareTo, equals, get, get, hasArray, hashCode, put, put, put, wrap, wrap |
| Methods inherited from class java.nio.Buffer |
capacity, checkArraySize, checkForOverflow, checkForOverflow, checkForUnderflow, checkForUnderflow, checkIfReadOnly, checkIndex, clear, flip, hasRemaining, limit, limit, mark, position, position, remaining, reset, rewind |
readOnly
private boolean readOnly
FloatBufferImpl
FloatBufferImpl(int capacity)
FloatBufferImpl
FloatBufferImpl(float[] buffer,
int offset,
int capacity,
int limit,
int position,
int mark,
boolean readOnly)
isReadOnly
public boolean isReadOnly()
- Description copied from class:
Buffer
- Tells whether this buffer is read only or not.
- Specified by:
isReadOnly in class Buffer
slice
public FloatBuffer slice()
- Description copied from class:
FloatBuffer
- Creates a new
FloatBuffer whose content is a shared
subsequence of this buffer's content.
- Specified by:
slice in class FloatBuffer
duplicate
public FloatBuffer duplicate()
- Description copied from class:
FloatBuffer
- Creates a new
FloatBuffer that shares this buffer's
content.
- Specified by:
duplicate in class FloatBuffer
asReadOnlyBuffer
public FloatBuffer asReadOnlyBuffer()
- Description copied from class:
FloatBuffer
- Creates a new read-only
FloatBuffer that shares this
buffer's content.
- Specified by:
asReadOnlyBuffer in class FloatBuffer
compact
public FloatBuffer compact()
- Description copied from class:
FloatBuffer
- Compacts this buffer.
- Specified by:
compact in class FloatBuffer
isDirect
public boolean isDirect()
- Description copied from class:
FloatBuffer
- Tells wether or not this buffer is direct.
- Specified by:
isDirect in class FloatBuffer
get
public float get()
- Reads the
float at this buffer's current position,
and then increments the position.
- Specified by:
get in class FloatBuffer
put
public FloatBuffer put(float value)
- Relative put method. Writes
value to the next position
in the buffer.
- Specified by:
put in class FloatBuffer
get
public float get(int index)
- Absolute get method. Reads the
float at position
index.
- Specified by:
get in class FloatBuffer
put
public FloatBuffer put(int index,
float value)
- Absolute put method. Writes
value to position
index in the buffer.
- Specified by:
put in class FloatBuffer
order
public ByteOrder order()
- Description copied from class:
FloatBuffer
- Returns the byte order of this buffer.
- Specified by:
order in class FloatBuffer