共用方式為


CharBuffer.Read(CharBuffer) Method

Definition

Attempts to read characters into the specified character buffer.

[Android.Runtime.Register("read", "(Ljava/nio/CharBuffer;)I", "GetRead_Ljava_nio_CharBuffer_Handler")]
public virtual int Read (Java.Nio.CharBuffer? target);
[<Android.Runtime.Register("read", "(Ljava/nio/CharBuffer;)I", "GetRead_Ljava_nio_CharBuffer_Handler")>]
abstract member Read : Java.Nio.CharBuffer -> int
override this.Read : Java.Nio.CharBuffer -> int

Parameters

target
CharBuffer

the buffer to read characters into

Returns

The number of characters added to the buffer, or -1 if this source of characters is at its end

Implements

Attributes

Exceptions

if target is this buffer.

if an I/O error occurs.

if no changes may be made to the contents of target.

Remarks

Attempts to read characters into the specified character buffer. The buffer is used as a repository of characters as-is: the only changes made are the results of a put operation. No flipping or rewinding of the buffer is performed.

Added in 1.5.

Java documentation for java.nio.CharBuffer.read(java.nio.CharBuffer).

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