In this tutorial, you will see the use of slice method of ShortBuffer class.
In this tutorial, you will see the use of slice method of ShortBuffer class.In this tutorial, we will see the use of slice method of ShortBuffer class in java.
ShortBuffer API:
The java.nio.ShortBuffer class extends java.nio.Buffer class. It provides the following methods:
Return type | Method | Description |
static ShortBuffer | wrap(short [] array) | The wrap(....) method wrapping an existing short array into short buffer. |
abstract ShortBuffer | slice() | The slice() method returns slice buffer that share the remaining content of associated short buffer. |
import java.nio.*;
|
C:\>java SliceShortBuffer Elements in short buffer. 78 97 34 5 Remaining element in buffer : 4 Elements in slice short buffer. 78 97 34 5 |