MappedByteBuffer.Compact Method

Definition

Compacts this buffer  (optional operation).

[Android.Runtime.Register("compact", "()Ljava/nio/ByteBuffer;", "GetCompactHandler", ApiSince=35)]
public override Java.Nio.ByteBuffer? Compact();
[<Android.Runtime.Register("compact", "()Ljava/nio/ByteBuffer;", "GetCompactHandler", ApiSince=35)>]
override this.Compact : unit -> Java.Nio.ByteBuffer

Returns

This buffer

Attributes

Exceptions

if this buffer is read-only.

Remarks

Copies the elements between the current position and limit to the beginning of the buffer, sets the position to the number of copied elements, sets the limit to the capacity, and discards the mark.

Java documentation for java.nio.MappedByteBuffer.compact().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to