home *** CD-ROM | disk | FTP | other *** search
/ Print Shop Ensemble 3 / the-print-shop-ensemble-iii.iso / worldnet / disk2 / java.z / MOZ2_01.ZIP / netscape / applet / ConsoleOutputStream.class (.txt) < prev    next >
Encoding:
Java Class File  |  1996-03-08  |  1.3 KB  |  29 lines

  1. package netscape.applet;
  2.  
  3. import java.io.OutputStream;
  4.  
  5. class ConsoleOutputStream extends OutputStream {
  6.    Console console;
  7.    byte[] doh = new byte[1];
  8.  
  9.    ConsoleOutputStream(Console console) {
  10.       this.console = console;
  11.    }
  12.  
  13.    public void write(int b) {
  14.       this.doh[0] = (byte)b;
  15.       String s = new String(this.doh, 0, 0, 1);
  16.       this.console.frame.text.insertText(s, 99999);
  17.    }
  18.  
  19.    public void write(byte[] b) {
  20.       String s = new String(b, 0, 0, b.length);
  21.       this.console.frame.text.insertText(s, 99999);
  22.    }
  23.  
  24.    public void write(byte[] b, int off, int len) {
  25.       String s = new String(b, 0, off, len);
  26.       this.console.frame.text.insertText(s, 99999);
  27.    }
  28. }
  29.