The Streams Package
Introducing the Streams Package
The Streams package includes both concrete stream classes and a modular framework that allows streams to be connected to one another to form complex chains of streaming elements.
Streams package classes can be connected to one another to form simple stream elements which then can be linked together to form complicated streaming transformations. For example, you can connect a synchronized binary stream to a buffered binary stream, which in turn is connected to a streambuf binary stream. One of the major advantages of this architecture is that it is highly scalable. An application can combine streaming elements according to its need. For instance, in the previous example, if your application is not thread-hot, you might decide to remove the synchronized binary stream element.
The Streams package also contains adapter classes that adapt other streaming interfaces to the Advanced Tools Module streaming interface. This means that an application designed to use a streaming library such as iostreams can instantly use the Streams package by using an adapter class as the first streaming element. The Streams package contains adapter classes for both Standard iostreams and the Essential Tools Module virtual streams.