Name
FloatBuffer
Synopsis
FloatBuffer
holds
a sequence of float values for use in an I/O
operation. Most of the methods of this class are directly analogous
to methods defined by ByteBuffer except that they
use float and float[ ] argument
and return values instead of byte and
byte[ ] values. See ByteBuffer
for details.
FloatBuffer is abstract and has no constructor.
Create one by calling the static
allocate( ) or
wrap( ) methods, which are also analogs of
ByteBuffer methods. Or, create a
“view”
FloatBuffer by calling the asFloatBuffer(
)
method of an underlying
ByteBuffer.
Figure 13-6. java.nio.FloatBuffer
public abstract class FloatBuffer extends Buffer implements Comparable<FloatBuffer> { // No Constructor // Public Class Methods public static FloatBuffer allocate(int capacity); public static FloatBuffer wrap(float[ ] array); public static FloatBuffer wrap(float[ ] array, int offset, int length); // Public Instance Methods public final float[ ] array( ); public final int arrayOffset( ); public abstract FloatBuffer asReadOnlyBuffer( ); public abstract FloatBuffer compact( ); public abstract FloatBuffer duplicate( ); public abstract float get( ); public abstract float get(int index); public FloatBuffer get(float[ ] dst); public FloatBuffer get(float[ ] dst, int offset, int length); public final boolean hasArray( ); public abstract boolean isDirect( ); public abstract ByteOrder order ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access