ABSTRACT

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.