rvl.util
Class TextAreaOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.ByteArrayOutputStream
          extended by rvl.util.TextAreaOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class TextAreaOutputStream
extends java.io.ByteArrayOutputStream

This class is used to set up a TextArea to receive output. e.g., to redirect System.out, you'd do: TextAreaOutputStream taos = new TextAreaOutputStream (txtArea); PrintStream ps = new PrintStream (taos, true); System.setIn (ps);


Field Summary
 
Fields inherited from class java.io.ByteArrayOutputStream
buf, count
 
Constructor Summary
TextAreaOutputStream(java.awt.TextArea ta)
          Construct a TextAreaOutputStream with the given TextArea
 
Method Summary
 void flush()
           
 
Methods inherited from class java.io.ByteArrayOutputStream
close, reset, size, toByteArray, toString, toString, toString, write, write, writeTo
 
Methods inherited from class java.io.OutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextAreaOutputStream

public TextAreaOutputStream(java.awt.TextArea ta)
Construct a TextAreaOutputStream with the given TextArea

Method Detail

flush

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