Lesson 10
Java Input | Output, Reader Writer Conclusion
This module covered a lot of Java I/O territory. You began with an overview of Java I/O and how streams form the basis of it.
You then learned about the core classes that comprise the Java I/O package, java.io, including the different stream, reader, and writer classes.
From there you learned how to create streams, along with how to read from them and write from them. Finally, the module concluded by showing you how to apply your newfound I/O knowledge to files.
If you are interested in learning more about Java streams, consider taking
- Java Streams in
Networking with Java Series. Also included in that series is a
- Java Readers and Writers course.
How do Java 1.1 Streams form the basis for Input and Output
Java 1.1 introduced the java.io package which provides the basic classes for input and output operations through streams. The java.io package includes classes like InputStream, OutputStream, Reader, and Writer that are the foundation of Java's input/output framework. These classes provide a way to read and write data in a program, and the data can be read or written in a variety of formats, including binary, text, and object serialization. The use of streams allows for efficient processing of data, whether it be from a file, network socket, or any other source, by providing a uniform way to read and write data, regardless of the source or format.
Glossary terms
This module discussed how the following terms relate to Java:
- Stream: A stream is a medium through which data is transferred. A stream acts sort of like a pipe in the real world, except that it shuttles moving data instead of water or gas. Data is transferred through a stream one byte at a time, and can be directed in different ways. streams
- Buffered I/O: Buffered I/O is a special type of I/O where data is written to a temporary buffer instead of to an actual stream. When the buffer is full, all of the data in the buffer is written to the stream. Buffered I/O is more efficient than non-buffered I/O since data is transferred to and from a physical device in large blocks. buffered I/O
Java Input Output - Quiz