Now that you've had an introduction to the stream classes, you can put your knowledge to work. Perhaps the most common use of I/O ”outside of retrieving data from the keyboard and displaying data onscreen ”is file I/O. Any program that wants to retain its status (including the status of any edited files) must be capable of loading and saving files. Java provides several classes ”including File, FileDescriptor, RandomAccessFile, FileInputStream, FileOutputStream, FilePermission, FileReader, and FileWriter ”for dealing with files. In this section, you examine these classes and get a chance to see how they work. |