共用方式為


Buffer.Position Method

Definition

Overloads

Position()

Returns this buffer's position.

Position(Int32)

Sets this buffer's position.

Position()

Returns this buffer's position.

[Android.Runtime.Register("position", "()I", "")]
public int Position ();
[<Android.Runtime.Register("position", "()I", "")>]
member this.Position : unit -> int

Returns

The position of this buffer

Attributes

Remarks

Returns this buffer's position.

Java documentation for java.nio.Buffer.position().

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

Position(Int32)

Sets this buffer's position.

[Android.Runtime.Register("position", "(I)Ljava/nio/Buffer;", "GetPosition_IHandler")]
public virtual Java.Nio.Buffer? Position (int newPosition);
[<Android.Runtime.Register("position", "(I)Ljava/nio/Buffer;", "GetPosition_IHandler")>]
abstract member Position : int -> Java.Nio.Buffer
override this.Position : int -> Java.Nio.Buffer

Parameters

newPosition
Int32

The new position value; must be non-negative and no larger than the current limit

Returns

This buffer

Attributes

Exceptions

if newPosition is invalid.

Remarks

Sets this buffer's position. If the mark is defined and larger than the new position then it is discarded.

Java documentation for java.nio.Buffer.position(int).

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