- Associate a low-level input (i.e.,
FileInputStream
) or output (i.e.,FileOutputStream
) stream with a File object - Describe how low-level file I/O works (i.e., reading or writing of byte data, importance of the sequence of data)
- Describe how high-level (
DataOutputStream
andDataInputStream
) file I/O works (i.e., methods for reading and writing of primitive data types, association with low-level stream, the importance of the sequence of data) - Explain why it is important to close a stream when file operations are complete
- Use the try-with-resources construct to ensure resources are closed appropriately
- Explain what the
PrintWriter
class is used for - Read text data from a file using
Scanner
objects - Use the
Files
class to read/write text files - Explain the difference between binary and text files
Note taking requirement
Don't forget to submit your notes in Canvas prior to classtime.
Reading
- Study sections 16.1-16.5
Intro [4:48]
- Watch the following video [link]
File IO Streams [5:03]
- Watch the following video [link]
High Level IO (primitives) [6:31]
- Watch the following video [link]
Text IO [2:22]
- Watch the following video [link]
Object IO [5:40]
- Watch the following video [link]
File Related Exceptions [1:07]
- Watch the following video [link]
Code Sample of Raw IO [14:29]
- Watch the following video [link]