In this tutorial you will see the use of toString() method of FloatBuffer class.
In this tutorial you will see the use of toString() method of FloatBuffer class.In this tutorial, we will see how to represent the state of buffer in the form of string.
FloatBuffer API:
The java.nio.FloatBuffer class extends java.nio.Buffer class. It provides the following methods:
Return type | Method | Description |
static FloatBuffer | allocate( int capacity) | The allocate(..) method allocate a float buffer of given capacity. |
abstract FloatBuffer | toString | The toString() method returns a string that summarizing of buffer state. |
import java.nio.*;
|
C:\>java FlBufferToString Information of float buffer. Position : 2 Limit : 512 Capacity : 512 String representation of the float buffer state. java.nio.HeapFloatBuffer[pos=2 lim=512 cap=512] |