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
-
out
- A Vector of attached streams.
-
TeeOutputStream(Enumeration)
- Creates a new TeeOutputStream attached to an
Enumeration of OutputStreams.
-
TeeOutputStream(OutputStream, OutputStream)
- Creates a new TeeOutputStream attached to two
OutputStreams.
-
close()
- Closes all of the attached streams.
-
flush()
- Flushes all of the attached streams.
-
write(byte[], int, int)
- Writes a subarray of bytes to all of the attached streams.
-
write(int)
- Writes a byte of data to all of the attached streams.
out
protected Vector out
- A Vector of attached streams.
TeeOutputStream
public TeeOutputStream(OutputStream o1,
OutputStream o2)
- Creates a new TeeOutputStream attached to two
OutputStreams.
TeeOutputStream
public TeeOutputStream(Enumeration os)
- Creates a new TeeOutputStream attached to an
Enumeration of OutputStreams.
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
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
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
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