跟 JDK 学英语(8)- Readable

一、原文与翻译

public interface Readable

A Readable is a source of characters. Characters from a Readable are made available to callers of the read method via a CharBuffer.

Readable 是字符的一个来源。Readable 里的字符通过一个 CharBuffer 对象让 read 方法的调用者可以使用它。

Since: 1.5

自:1.5

int read(CharBuffer cb) throws IOException

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.

尝试把字符读进传入的字符缓存区里。这个缓存区被用作字符的一个仓库,这些字符是按原样使用的:只有 put 操作才会对它们做修改。不执行缓冲区的翻转或重绕。

二、词汇学习

source: 来源,原始资料
attempt: 尝试
specified: 规定的,指定的
repository: 仓库
flipping: 翻转
rewinding: 重绕,倒带

三、句子分析

Characters from a Readable are made available to callers of the read method via a CharBuffer.

be made ... via ... :通过。。。来让。。。怎么样
callers of the read method :读方法的调用者

四、技术要点

Readable 接口声明一个类可以把它内部的字符读取到一个字符缓冲区,以供外部调用。

微信公众号.jpg

你可能感兴趣的:(跟 JDK 学英语(8)- Readable)