BufferedReader.readLine()
method. Programs that use the
DataInputStream
class to read lines can be converted to use
the BufferedReader
class by replacing code of the form:
with:
DataInputStream d = new DataInputStream(in);
BufferedReader d
= new BufferedReader(new InputStreamReader(in));
See the general contract of the readLine
method of DataInput
.
Bytes for this operation are read from the contained input stream.
IOException | if an I/O error occurs. |
java.io.BufferedReader.readLine(), java.io.FilterInputStream.in
Diagram: InputStream