I/O and Parsing: Reading and Writing With Java's Input/Output Streams and Parsing Utilities
I/O and Parsing: Reading and Writing With Java's Input/Output Streams and Parsing Utilities
input output
byte InputStream OutputStream
character Reader Writer
Using a Stream Class
if (br != null) {
try { br.close(); }
catch (IOException e) { /* ignore */ }
}
return line;
}
What We've Learned So Far
Types of Streams
Input vs. output streams
Byte vs. character streams
How to . . .
Read from text files
Write to text files
Read text from keyboard input
Use buffered streams
You are left on your own to figure out
how to use other streams