madkit.utils.graphics
Class JTextAreaOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by madkit.utils.graphics.JTextAreaOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class JTextAreaOutputStream
extends java.io.OutputStream

An outputstream that appends its output to a TextArea. Based on code from Albert L. Ting" .


Constructor Summary
JTextAreaOutputStream()
           
JTextAreaOutputStream(javax.swing.JTextArea area)
           
 
Method Summary
 void clear()
           
 void close()
           
 void flush()
           
 void write(byte[] data, int off, int len)
           
 void write(int x)
           
 void write(java.lang.String str)
           
 
Methods inherited from class java.io.OutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JTextAreaOutputStream

public JTextAreaOutputStream()

JTextAreaOutputStream

public JTextAreaOutputStream(javax.swing.JTextArea area)
Method Detail

clear

public void clear()

write

public void write(int x)
Specified by:
write in class java.io.OutputStream

write

public void write(java.lang.String str)

write

public void write(byte[] data,
                  int off,
                  int len)
Overrides:
write in class java.io.OutputStream

flush

public void flush()
Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.OutputStream

close

public void close()
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.OutputStream


Copyright © Madkit Team (O. Gutknecht, J. Ferber, F. Michel et al.) All Rights Reserved.