This module introduces streams, the foundation of input and output in Java. Anytime you read data
- from a file,
- a network connection,
you are using streams. Similarly, anytime you write data to a file, a network connection, or System.out, you will use streams.
In this module, you will learn the following:
What streams are
Where streams come from
When you should use streams
A stream is an ordered sequence of bytes of undetermined length.
Input streams move bytes of data into a Java program from an external source.
Output streams move bytes of data from Java to an external target.
(In special cases streams can also move bytes from one part of a Java program to another.)