Most visited

Recently visited

Added in API level 1

Readable

public interface Readable

java.lang.Readable
Known Indirect Subclasses


A Readable是角色的来源。 Readable字符经由提供给读出方法的呼叫者CharBuffer

Summary

Public methods

abstract int read(CharBuffer cb)

尝试将字符读入指定的字符缓冲区。

Public methods

read

Added in API level 1
int read (CharBuffer cb)

尝试将字符读入指定的字符缓冲区。 该缓冲区原样用作字符的存储库:唯一的更改是放置操作的结果。 不执行翻转或倒带缓冲器。

Parameters
cb CharBuffer: the buffer to read characters into
Returns
int The number of char values added to the buffer, or -1 if this source of characters is at its end
Throws
IOException if an I/O error occurs
NullPointerException if cb is null
ReadOnlyBufferException if cb is a read only buffer

Hooray!