共用方式為


Buffer.Limit Method

Definition

Overloads

Limit()

Returns this buffer's limit.

Limit(Int32)

Sets this buffer's limit.

Limit()

Returns this buffer's limit.

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

Returns

The limit of this buffer

Attributes

Remarks

Returns this buffer's limit.

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

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

Limit(Int32)

Sets this buffer's limit.

[Android.Runtime.Register("limit", "(I)Ljava/nio/Buffer;", "GetLimit_IHandler")]
public virtual Java.Nio.Buffer? Limit (int newLimit);
[<Android.Runtime.Register("limit", "(I)Ljava/nio/Buffer;", "GetLimit_IHandler")>]
abstract member Limit : int -> Java.Nio.Buffer
override this.Limit : int -> Java.Nio.Buffer

Parameters

newLimit
Int32

The new limit value; must be non-negative and no larger than this buffer's capacity

Returns

This buffer

Attributes

Exceptions

if newLimit is invalid.

Remarks

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

Java documentation for java.nio.Buffer.limit(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