public interface Readable
Readable
object is simply a source for Unicode character
data. On request, a Readable
will provide its data in
a supplied CharBuffer
.Modifier and Type | Method and Description |
---|---|
int |
read(CharBuffer buf)
Adds the character data supplied by this
Readable
to the specified character buffer. |
int read(CharBuffer buf) throws IOException
Readable
to the specified character buffer. This method simply places
each character into the buffer as supplied, using put()
,
without flipping or rewinding.buf
- the buffer to place the character data in.char
values placed in the buffer,
or -1 if no more characters are available.IOException
- if an I/O error occurs.NullPointerException
- if buf is null.ReadOnlyBufferException
- if buf is read only.