Taal

MappedByteBuffer.Rewind Method

Definition

Rewinds this buffer.

[Android.Runtime.Register("rewind", "()Ljava/nio/Buffer;", "", ApiSince=35)]
public override sealed Java.Nio.Buffer? Rewind();
[<Android.Runtime.Register("rewind", "()Ljava/nio/Buffer;", "", ApiSince=35)>]
override this.Rewind : unit -> Java.Nio.Buffer

Returns

This buffer

Attributes

Remarks

Rewinds this buffer. The position is set to zero and the mark is discarded. Invoke this method before a sequence of channel-write or get operations, assuming that the limit has already been set appropriately. For example:

out.write(buf);    // Write remaining data
buf.rewind();      // Rewind buffer
buf.get(array);    // Copy data into array

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

Java reference for java.nio.MappedByteBuffer.rewind.

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