November 2012
Beginner
936 pages
28h 4m
English
Chapter 22
In chapter 9 we saw how to use scala.io.Source and java.util.Scanner to read from files. We also saw how we could use java.io.PrintWriter to write out files. In this chapter we will explore the overall structure of the java.io package and see how streams can be used to represent a general approach to input and output. This will set us up in the following chapter to use streams for network communication.
The original library for doing input and output in Java was the java.io package. While there is now a java.nio package that can provide higher performance, the original library is still used as a foundation for many other parts of the Java libraries, which makes it worth knowing and understanding. ...
Read now
Unlock full access