In this tutorial, you will see how to create a duplicate buffer of a long buffer in java.
In this tutorial, you will see how to create a duplicate buffer of a long buffer in java.LongBuffer API :
The java.nio. LongBuffer class extends java.nio.Buffer class. It provides the following methods:
Return type | Method | Description |
static LongBuffer | allocate( int capacity) | The allocate(..) method allocate a long buffer of given capacity. |
abstract LongBuffer | duplicate() | The duplicate() method returns a duplicate buffer that share the content of available buffer. |
import java.nio.*;
|
C:\>java DuplicateBuffer Content in original long buffer. 44645669 57554776 77557434 Content in duplicate long buffer. 44645669 57554776 77557434 |