home *** CD-ROM | disk | FTP | other *** search
- package netscape.applet;
-
- import java.io.OutputStream;
-
- class ConsoleOutputStream extends OutputStream {
- Console console;
- byte[] doh = new byte[1];
-
- ConsoleOutputStream(Console console) {
- this.console = console;
- }
-
- public void write(int b) {
- this.doh[0] = (byte)b;
- String s = new String(this.doh, 0, 0, 1);
- this.console.frame.text.insertText(s, 99999);
- }
-
- public void write(byte[] b) {
- String s = new String(b, 0, 0, b.length);
- this.console.frame.text.insertText(s, 99999);
- }
-
- public void write(byte[] b, int off, int len) {
- String s = new String(b, 0, off, len);
- this.console.frame.text.insertText(s, 99999);
- }
- }
-