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 ByteOrder | order() | The order(..) method returns order of bytes used by short buffer. |
ByteBuffer API:
The java.nio.ByteBuffer class extends java.nio.Buffer class. It provides the following methods:
| Return type | Method | Description |
| static ByteBuffer | wrap([] array) | The wrap(....) method wrapping an existing byte array into byte buffer. |
| abstrtact ShortBuffer | asShortBuffer() | The asShortBuffer() method returns short buffer based on byte buffer. |
import java.nio.*;
|
| C:\>java ByteOrder Byte order of short buffer : BIG_ENDIAN Byte order of short buffer : LITTLE_ENDIAN |
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.