Class prominence.io.TeeOutputStream
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class prominence.io.TeeOutputStream

java.lang.Object
   |
   +----java.io.OutputStream
           |
           +----prominence.io.TeeOutputStream

public class TeeOutputStream
extends OutputStream
A FilterOutputStream that attaches to several OutputStreams and directs any written data to all of the attached streams.
See Also:
SequenceInputStream

Variable Index

 o out
A Vector of attached streams.

Constructor Index

 o TeeOutputStream(Enumeration)
Creates a new TeeOutputStream attached to an Enumeration of OutputStreams.
 o TeeOutputStream(OutputStream, OutputStream)
Creates a new TeeOutputStream attached to two OutputStreams.

Method Index

 o close()
Closes all of the attached streams.
 o flush()
Flushes all of the attached streams.
 o write(byte[], int, int)
Writes a subarray of bytes to all of the attached streams.
 o write(int)
Writes a byte of data to all of the attached streams.

Variables

 o out
  protected Vector out
A Vector of attached streams.

Constructors

 o TeeOutputStream
  public TeeOutputStream(OutputStream o1,
                         OutputStream o2)
Creates a new TeeOutputStream attached to two OutputStreams.
 o TeeOutputStream
  public TeeOutputStream(Enumeration os)
Creates a new TeeOutputStream attached to an Enumeration of OutputStreams.

Methods

 o flush
  public void flush() throws IOException
Flushes all of the attached streams.
Throws: IOException
Occurs if there was a problem flushing one of the streams. This method attempts to flush all attached streams before reporting an exception.
Overrides:
flush in class OutputStream
 o close
  public void close() throws IOException
Closes all of the attached streams.
Throws: IOException
Occurs if there was a problem closing one of the streams. This method attempts to close all attached streams before reporting an exception.
Overrides:
close in class OutputStream
 o write
  public void write(int b) throws IOException
Writes a byte of data to all of the attached streams.
Parameters:
b - The byte to be written
Throws: IOException
Occurs if there was a problem writing to one of the streams. This method attempts to write to all attached streams before reporting an exception.
Overrides:
write in class OutputStream
 o write
  public void write(byte b[],
                    int off,
                    int len) throws IOException
Writes a subarray of bytes to all of the attached streams.
Parameters:
b - The array from which to write
off - The index from which to write
len - The number of bytes to write
Throws: IOException
Occurs if there was a problem writing to one of the streams. This method attempts to write to all attached streams before reporting an exception.
Overrides:
write in class OutputStream

All Packages  Class Hierarchy  This Package  Previous  Next  Index