In this tutorial, you will see how to write a long value at given index into long buffer.
In this tutorial, you will see how to write a long value at given index into long buffer.In this tutorial, we will see how to write a long value at given index into long buffer.
LongBuffer API:
The java.nio.LongBuffer class extends java.nio.Buffer class. It provides the following methods:
Return type | Method | Description |
static LongBuffer | wrap(long[] array) | The wrap(....) method wrap an existing long array and create long buffer. |
abstract LongBuffer | put(int index, long value) | The put(..) method write the given long value into buffer at given index. |
abstract long | get() | The get() method read long value from given index. |
import java.nio.*;
|
C:\>java PutAtIndex Value in buffer. 44645669 57554776 77557434 After putting value at index : 1 Value in buffer. 44645669 12345 77557434 |