Reading and writing filesTopStreams

Streams

So far we have seen how to get input typed in by the user, but often we have large files of information already stored in a file on a computer. In this section we will discuss how we can read and write files. Interestingly, we will see that once we master this technique, nearly identical code will also allow us to grab web pages over the net or to play with e-mail or even write your own program for chatting over the internet.


Reading and writing filesTopStreams