Documentation for this section has not yet been entered.
Type Reason Java.Nio.ReadOnlyBufferException if no changes may be made to the contents of this buffer.
Compacts this short buffer.
The remaining shorts will be moved to the head of the buffer, starting from position zero. Then the position is set to remaining(); the limit is set to capacity; the mark is cleared.