1 package org.paneris.jammyjoes.mail; 2 3 import java.io.IOException; 4 import java.io.Writer; 5 6 public class WriterFascade extends Writer { 7 8 Writer out1; 9 Writer out2; 10 11 public WriterFascade(Writer out1, Writer out2) { 12 this.out1 = out1; 13 this.out2 = out2; 14 } 15 16 public void write(char[] cbuf, int off, int len) throws IOException { 17 out1.write(cbuf, off, len); 18 out2.write(cbuf, off, len); 19 } 20 21 public void flush() throws IOException { 22 out1.flush(); 23 out2.flush(); 24 } 25 26 public void close() throws IOException { 27 out1.close(); 28 out2.close(); 29 } 30 31 }