1.3.3. Decorator OutputStream

From the book:

A well known example of a decorator is the java.io.InputStream and related classes, with the design copied from C++. Concrete components include FileInputStream and SocketInputStream. We also have a myriad of decorators, such as BufferedInputStream for adding I/O buffering, DataInputStream for reading primitive data in little-endian format, and ObjectInputStream for reading Java objects using serialization. There is even a ProgressMonitorInputStream that opens up a Swing progress dialog if it takes longer than two seconds to read the input.

Complete and Continue  
Discussion

0 comments