Package java.lang
Interface Readable
- All Known Implementing Classes:
BufferedReader,CharArrayReader,CharBuffer,FileReader,FilterReader,InputStreamReader,LineNumberReader,PemReader,PipedReader,PushbackReader,Reader,StringReader
public interface Readable
Represents a sequence of characters that can be incrementally read (copied)
into a
CharBuffer.-
Method Summary
Modifier and Type Method Description intread(CharBuffer cb)Reads characters into the specifiedCharBuffer.
-
Method Details
-
read
Reads characters into the specifiedCharBuffer. The maximum number of characters read isCharBuffer.remaining().- Parameters:
cb- the buffer to be filled with characters read.- Returns:
- the number of characters actually read, or -1 if this
Readablereaches its end - Throws:
IOException- if an I/O error occurs.
-