home *** CD-ROM | disk | FTP | other *** search
- package sun.rmi.rmic;
-
- import java.awt.TextArea;
- import java.io.OutputStream;
-
- class TextAreaOutput extends OutputStream {
- int count;
- char[] buf;
- TextArea textarea;
-
- TextAreaOutput(TextArea var1) {
- this.textarea = var1;
- this.buf = new char[80];
- this.count = 0;
- }
-
- public void write(int var1) {
- if (this.count >= this.buf.length) {
- this.flush();
- }
-
- this.buf[this.count++] = (char)var1;
- if ((char)var1 == '\n') {
- this.flush();
- }
-
- }
-
- public void flush() {
- this.textarea.enable();
- String var1 = new String(this.buf, 0, this.count);
- this.textarea.appendText(var1);
- this.count = 0;
- }
- }
-