import java.io.*; public class SplitterOutputStream extends FilterOutputStream { FilterOutputStream filterTwo; SplitterOutputStream(OutputStream os1, OutputStream os2) { super(os1); filterTwo = new FilterOutputStream (os2); } public void close() throws IOException { close(); filterTwo.close(); } public void flush() throws IOException { flush() ; filterTwo.flush() ; } public void write(int b) throws IOException { super.write(b) ; filterTwo.write(b) ; } public void write(byte[] b) throws IOException { super.write(b) ; filterTwo.write(b) ; } public void write(byte[] b, int off, int len) throws IOException { super.write(b,off,len) ; filterTwo.write(b,off,len) ; } }