Output Streams

We classify output streams by:
  1. the sink passed to their constructor
  2. the special methods they add
The abstract superclass of all output streams is:
OutputStream
+ write(int)
+ flush()
+ close()
Subclasses of OutputStream include:
ByteArrayOutputStream
+ ctor()
+ toByteArray() : byte[]
FileOutputStream
+ ctor( File )
+ ctor( String )
PipedOutputStream
+ ctor( PipedInputStream )
+ connect(PipedInputStream)
Filter output streams take other output streams as their sink:
ObjectOutputStream
+ ctor(OutputStream)
+ writeObject(Object)
FilterOutputStream
+ ctor(OutputStream)
Subclasses of FilterOutputStream include:
BufferedOutputStream
+ ctor(OutputStream)
DataOutputStream
+ ctor(OutputStream)
+ write(int)
+ writeDouble(double)
... and so on
PrintStream
+ ctor(OutputStream)
+ print(Object or primitive)
+ println(Object or primitive)
A special filter output stream is the abstract:
DeflaterOutputStream
+ ctor(OutputStream)
Subclasses of DeflaterOutputStream include:
ZipOutputStream
+ ctor(OutputStream)
+ putNextEntry(ZipEntry)
+ closeEntry()
JarOutputStream
+ ctor(OutputStream, Manifest)
+ putNextEntry(ZipEntry)