We will be examining each of these methods in the next several lessons.
All of these methods are present in the various subclasses of java.io.Reader.
|Lesson 4||Java Reader class|
|Objective||Investigate the fundamental methods of the Reader class.|
java.io.Readerclass provides text-based input to Java programs. A stream is the source of the bytes containing the text. However, as the bytes are read they are converted into Java
charsbefore being passed on to the other parts of the program. One or more bytes may be read for each character produced.
java.io.Readerclass are deliberately similar to the methods of the
java.io.InputStreamclass. However, rather than working with bytes, they work with
public abstract int read(char buffer, int offset, int length) throws IOException
public int read(char buffer) throws IOException
public int read() throws IOException