Java's BufferedReader extends the abstract Reader class, which reads character streams.
import java.io.BufferedReader;
import java.io.FileReader;
try {
BufferedReader br = new BufferedReader( new FileReader( someFile ) );
while ( br.ready() ) {
String line = br.readLine();
// processLine(line)
}
br.close();
} catch (Exception e) {}
read() will read one character, readline() will read a line. Don't forget to close the reader when you're done. The BufferedReader has two constructors, one that takes a "regular" Reader object, and the other that takes a Reader and the size of the buffer.
Ubu World Cafe - Linux Variant CentOs
-
The UbuWarrior has in its awareness a knowledge of other Linux variants.
Today, we talk about the mysterious CentOS. CentOS is derived from RHEL
(Red Ha...
9 months ago
No comments:
Post a Comment