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 | 0 | public WriterFascade(Writer out1, Writer out2) { |
12 | 0 | this.out1 = out1; |
13 | 0 | this.out2 = out2; |
14 | 0 | } |
15 | |
|
16 | |
public void write(char[] cbuf, int off, int len) throws IOException { |
17 | 0 | out1.write(cbuf, off, len); |
18 | 0 | out2.write(cbuf, off, len); |
19 | 0 | } |
20 | |
|
21 | |
public void flush() throws IOException { |
22 | 0 | out1.flush(); |
23 | 0 | out2.flush(); |
24 | 0 | } |
25 | |
|
26 | |
public void close() throws IOException { |
27 | 0 | out1.close(); |
28 | 0 | out2.close(); |
29 | 0 | } |
30 | |
|
31 | |
} |