home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 1999 March / maximum-cd-1999-03.iso / Feature / Lotus / ORGANIZE / COMPNENT / LTOUIN21.ZIP / sun / activator / DebugOutputStream.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-03-12  |  1.0 KB  |  34 lines

  1. package sun.activator;
  2.  
  3. import java.io.IOException;
  4. import java.io.OutputStream;
  5.  
  6. public class DebugOutputStream extends OutputStream {
  7.    private StringBuffer buf = new StringBuffer();
  8.    private ConsoleWindow console;
  9.  
  10.    DebugOutputStream(ConsoleWindow var1) {
  11.       this.console = var1;
  12.    }
  13.  
  14.    public synchronized void flush() {
  15.       if (this.console != null) {
  16.          this.console.append(this.buf.toString());
  17.       }
  18.  
  19.       this.buf = new StringBuffer();
  20.    }
  21.  
  22.    protected void printDebug(String var1) {
  23.    }
  24.  
  25.    public synchronized void write(int var1) throws IOException {
  26.       Character var2 = new Character((char)var1);
  27.       this.buf.append(var2);
  28.       if (var1 == 10 || var1 == 13 || this.buf.length() > 80) {
  29.          this.flush();
  30.       }
  31.  
  32.    }
  33. }
  34.