// OK, we're going to read a file. Do it...
FileInputStream is = new FileInputStream("index.htm");
BufferedReader ds = new BufferedReader(
new InputStreamReader(
new ProgressMonitorInputStream(this,
"Loading...", new FileInputStream("index.htm"))));
// Now read it...
String line;
while ((line = ds.readLine()) != null) {
if (System.getProperties().getProperty("debug.lines")!=null)
System.err.println("Read this line: " + line);
try {
Thread.sleep(200); // slow it down a bit.
} catch(InterruptedException e) {
return;
}
}
// Close file, since it was opened.
ds.close();