home *** CD-ROM | disk | FTP | other *** search
/ PC User 2003 May / Disc 2 / PCU0503CD2.iso / Crystal / 3rdparty / JavaVM / Plug-in / jplugin.exe / jaws.jar / sun / plugin / DebugOutputStream.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-06-22  |  1016 b   |  34 lines

  1. package sun.plugin;
  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 write(int var1) throws IOException {
  15.       Character var2 = new Character((char)var1);
  16.       this.buf.append(var2);
  17.       if (var1 == 10 || var1 == 13 || this.buf.length() > 80) {
  18.          this.flush();
  19.       }
  20.  
  21.    }
  22.  
  23.    public synchronized void flush() {
  24.       if (this.console != null) {
  25.          this.console.append(this.buf.toString());
  26.       }
  27.  
  28.       this.buf = new StringBuffer();
  29.    }
  30.  
  31.    protected void printDebug(String var1) {
  32.    }
  33. }
  34.