 | Chapter Summary (See related pages)
- AFile object represents a file or a directory.
- An instance of the JFileChooser class is a file dialog that lets the user select a file to read data from or to save data to.
- Various input and output stream classes are defined in the java.io package.
- Low-level file input and output read and write data 1 byte at a time.
- FileInputStream and FileOutputStream classes are used for low-level file I/O.
- High-level file input and output read and write data of primitive data type.
- DataInputStream and DataOutputStream classes are used for high-level file I/O.
- With text I/O, data are read and saved as strings.
- PrinterWriter and BufferedReader classes are used for text I/O.
- With object I /O, data are read and saved as objects.
- ObjectInputStream and ObjectOutputStream are used for object I/O.
- To be able to save objects to a file, the class they belong to must implement the Serializable interface.
- The standard classes described or used in this chapter are
| File | | PrintWriter | | JFileChooser | | FileReader | | FileOutputStream | | BufferedReader | | FileInputStream | | Serializable | | DataOutputStream | | ObjectOutputStream | | DataInputStream | | ObjectInputStream |
|
|