Chapter 12. I/O in Java

This chapter introduces you to the techniques for performing input and output and dealing with files in Java. The classes to support I/O in Java are primarily in the package java.io. This package contains a lot of stream classes—some that are fairly common, and some that are used relatively rarely. This chapter focuses on the most common or important I/O classes and techniques.

Before proceeding, let me make a clarification of terminology in this chapter. When I say InputStream or OutputStream, I am referring to those two specific classes. When I say "input stream" or "output stream," I am referring to any class that is a subclass of InputStream or OutputStream. Likewise, there are the Reader and Writer classes, and

Get PURE Java™ 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.