Agent System POND 1.2 (28.2.2002)

FIM.Util
Class CopyFilterOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FilterOutputStream
              |
              +--FIM.Util.CopyFilterOutputStream

public class CopyFilterOutputStream
extends FilterOutputStream

A stream which copies all data sent through it to another stream. The content itself is not touched in any way.

Version:
1.0, 12.9.2001
Author:
Michael Sonntag

Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
CopyFilterOutputStream(OutputStream out, OutputStream copy)
          Create a new stream to copy the content written through to another stream.
 
Method Summary
 void close()
          Closes the destination and the copy stream.
 void flush()
          Flushes the destination and the copy stream.
 void write(byte[] b)
          Writes b.length bytes from the specified byte array to the output and the copy stream.
 void write(byte[] b, int off, int len)
          Writes len bytes from the specified byte array starting at offset off to the output and the copy stream.
 void write(int b)
          Writes the byte to the output and the copy stream.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopyFilterOutputStream

public CopyFilterOutputStream(OutputStream out,
                              OutputStream copy)
Create a new stream to copy the content written through to another stream.
Parameters:
out - the underlying OutputStream
Method Detail

close

public void close()
           throws IOException
Closes the destination and the copy stream.
Overrides:
close in class FilterOutputStream
Throws:
IOException - if an exception occurred in the underlying stream (either the destination or the copy)

flush

public void flush()
           throws IOException
Flushes the destination and the copy stream.
Overrides:
flush in class FilterOutputStream
Throws:
IOException - if an exception occurred in the underlying stream (either the destination or the copy)

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Writes len bytes from the specified byte array starting at offset off to the output and the copy stream.
Overrides:
write in class FilterOutputStream
Parameters:
b - the data
off - the start offset in the data
len - the number of bytes to write
Throws:
IOException - if an exception occurred in the underlying stream (either the destination or the copy)

write

public void write(int b)
           throws IOException
Writes the byte to the output and the copy stream.
Overrides:
write in class FilterOutputStream
Parameters:
b - the byte to be written
Throws:
IOException - if an exception occurred in the underlying stream (either the destination or the copy)

write

public void write(byte[] b)
           throws IOException
Writes b.length bytes from the specified byte array to the output and the copy stream.
Overrides:
write in class FilterOutputStream
Parameters:
b - the data
Throws:
IOException - if an exception occurred in the underlying stream (either the destination or the copy)

Agent System POND 1.2 (28.2.2002)

Submit a bug

Copyright 2001,2002 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.