de.neteye.actioncache
Class MultiplexServletOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--javax.servlet.ServletOutputStream
              |
              +--de.neteye.actioncache.MultiplexServletOutputStream

public class MultiplexServletOutputStream
extends javax.servlet.ServletOutputStream

ServletOutputStream that sends the data written to it to two different streams.

Version:
$Revision: 1.2 $
Author:
Felix Gnass

Constructor Summary
MultiplexServletOutputStream(java.io.OutputStream out1, java.io.OutputStream out2)
          Construct a new MultiplexServletOutputStream
 
Method Summary
 void close()
          Close the streams
 void flush()
          Flush the streams
 void write(byte[] value)
          Write to the output streams
 void write(byte[] b, int off, int len)
          Write to the output streams
 void write(int value)
          Write to the output streams
 
Methods inherited from class javax.servlet.ServletOutputStream
print, print, print, print, print, print, print, println, println, println, println, println, println, println, println
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiplexServletOutputStream

public MultiplexServletOutputStream(java.io.OutputStream out1,
                                    java.io.OutputStream out2)
Construct a new MultiplexServletOutputStream

Parameters:
out1 - The first output stream
out2 - The second output stream
Method Detail

write

public void write(int value)
           throws java.io.IOException
Write to the output streams

Specified by:
write in class java.io.OutputStream
Parameters:
value - The value to write
Throws:
java.io.IOException

write

public void write(byte[] value)
           throws java.io.IOException
Write to the output streams

Overrides:
write in class java.io.OutputStream
Parameters:
value - The value to write
Throws:
java.io.IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Write to the output streams

Overrides:
write in class java.io.OutputStream
Parameters:
off - The offset before starting to write
len - The lenght to write
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Flush the streams

Overrides:
flush in class java.io.OutputStream
java.io.IOException

close

public void close()
           throws java.io.IOException
Close the streams

Overrides:
close in class java.io.OutputStream
java.io.IOException