In this tutorial, we will see how to create a short array with the help of short buffer.
The java.nio.ShortBuffer class extends java.nio.Buffer class. It provides the following methods:
|static ShortBuffer||allocate( int capacity)||The allocate(..) method allocate a short buffer of given capacity.|
|short||array()||The array() method returns short array based on short buffer.|
|abstract short||get()||The get() method read short value from current position and increment position..|
Capacity of short buffer : 1024
Content in shortbuffer :
Length of short buffer array : 1024
Content in short buffer array :
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.