In this chapter, we will talk about processing data streams, which are different from the I/O streams we reviewed in Chapter 5, Strings, Input/Output, and Files. We will define what data streams are, how to process their elements using methods (operations) of the java.util.stream.Stream object, and how to chain (connect) stream operations in a pipeline. We will also discuss stream initialization and how to process streams in parallel.
The following topics will be covered in this chapter, as follows:
- Streams as a source of data and operations
- Stream initialization
- Operations (methods)
- Numeric stream interfaces
- Parallel streams