ShortBuffer API:
The java.nio.ShortBuffer class extends java.nio.Buffer class. It provides the following methods:
| Return type | Method | Description |
| static ShortBuffer | allocate( int capacity) | The allocate(..) method allocate a short buffer of given capacity. |
| abstract ShortBuffer | duplicate() | The duplicate() method returns a duplicate buffer that share the content of available buffer. |
| abstract short | get() | The get() method read short value from current position and increment position.. |
import java.nio.*;
|
|
C:\>java DShortBuffer Capacity of original short buffer : 1024 Content in original short buffer : 566 878 4886 Capacity of duplicate short buffer :1024 Content in duplicate short buffer : 566 878 4886 |
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.