Readable is a source of characters. Characters from
a Readable are made available to callers of the read
method via a CharBuffer.
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: The number ofchar values added to the buffer,
possibly zero, or -1 if this source of characters is at its endthe buffer to read characters into cb)Attempts to read characters into the specified character buffer. |
| read | back to summary |
|---|---|
| public 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. If the length of the specified character buffer is zero, then no characters will be read and zero will be returned.
| |