In this tutorial, you will see how to transfer the content of a short buffer into another.
In this tutorial, you will see how to transfer the content of a short buffer into another.In this tutorial, we will see how to transfer the content of a short buffer into another short buffer.
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. |
ShortBuffer | put(ShortBuffer buffer) | The put(..)method transfer the content of a short buffer into another short buffer. |
import java.nio.*;
|
C:\>java BufferToBuffer Transfer the content from one short buffer into another short buffer. Elements in this short buffer. 75 33 442 23 Elements in another short buffer. 75 33 442 23 |