Skip to Main Content
Java
book

Java

by Michael Sikora
January 2003
Beginner to intermediate content levelBeginner to intermediate
150 pages
7h 28m
English
Morgan Kaufmann
Content preview from Java
[]
7.5 DataInputStream and DataOutputStream
95
8
9
10
11
12
13
14
15
16
17
}
FileReader in = new FileReader("Filel.txt");
BufferedReader inBuffer = new BufferedReader(in);
while ((c = inBuffer.read()) l= -I){
System.out.print((char) c );
}
inBuffer, close () ;
in.close();
ReadBufFile
In line 9, we create a FileReader stream as previously. In line 1 O, we then create BufferedReader
stream to wrap the FileReader stream, in.
The remaining code is as before except that in line 11 we read from the buffer stream
using the java. io. BufferedReader. read method.
7.5 DatalnputStream and DataOutputStream
DataInputStream and ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java Programming

Java Programming

Hari Mohan Pandey
Java Programming

Java Programming

Poornachandra Sarang
JAVA Programming

JAVA Programming

K. Rajkumar
Java 9 for Programmers

Java 9 for Programmers

Paul J. Deitel, Harvey Deitel

Publisher Resources

ISBN: 9781558609099