Java Streams

Like all programming languages, Java has a way for programs to make use of the data streams provided by the operating system. Java's streams are defined in the java.io package.

Here are references to several online book chapters that review using Java streams, mostly for file I/O.

NOTE: The Java language now has two very different kinds of object that are called "streams". There are the traditional I/O streams that we introduce in this document. In addition, starting in Java 8, Java defined a Stream class that is an implementation of the Stream abstract data type, an idea that comes from functional programming languages. The new Stream class is not for doing I/O. The new Stream class provides a modern way to process data structures from the Java Collections Framework.

Here are the basic "stream" classes in Java. You can see that the java.util.stream.Stream class is nothing like the java.io.InputStream or java.io.OutputStream classes.

The Stream abstract data type is becoming an important part of modern programming languages. It plays a big part in modern Java.