Compacts this buffer (optional operation).
The longs between the buffer's current position and its limit, if any, are copied to the beginning of the buffer. That is, the long at index p =
position() is copied to index zero, the long at index p + 1 is copied to index one, and so forth until the long at index
limit() - 1 is copied to index n =
1 - p. The buffer's position is then set to n+1 and its limit is set to its capacity. The mark, if defined, is discarded.
The buffer's position is set to the number of longs copied, rather than to zero, so that an invocation of this method can be followed immediately by an invocation of another relative put method.
- This buffer
Implemented in java::nio::HeapLongBuffer, and java::nio::HeapLongBufferR.