1 package nmp.io;
2
3 import java.io.*;
4
5 public class DumpOutputStream
6 extends OutputStream
7 {
8 OutputStream out;
9 boolean toLog;
10
11 public DumpOutputStream( OutputStream out) {
12 this( out, false);
13 }
14
15 public DumpOutputStream( OutputStream out, boolean toLog) {
16 this.out = out;
17 this.toLog = toLog;
18 }
19
20 public void write( int b) throws IOException {
21 if( toLog)
22 nmp.util.Log.getWriter().write( b);
23 else
24 System.out.write( b);
25 out.write( b);
26 }
27 }
This page was automatically generated by Maven