adavid.io
Class JTextAreaOutputStream
java.lang.Object
|
+--java.io.OutputStream
|
+--adavid.io.JTextAreaOutputStream
- public class JTextAreaOutputStream
- extends java.io.OutputStream
JTextAreaOutputStream
output stream JTextArea (from JStringOutputStream)
as JTextArea is slow, it could be nice to use this class
inside a BufferedOutputStream to enhance performance
Constructor Summary |
JTextAreaOutputStream(javax.swing.JTextArea ta)
constructor: to a J text area |
JTextAreaOutputStream(javax.swing.JTextArea ta,
int size)
constructor: the text area and size of the
buffer to use (none by default) |
Method Summary |
void |
flush()
overrides OutputStream.flush() |
java.lang.String |
toString()
returns the written string |
void |
write(int b)
implements the stream: writes the byte to the string buffer |
Methods inherited from class java.io.OutputStream |
close,
write,
write |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
JTextAreaOutputStream
public JTextAreaOutputStream(javax.swing.JTextArea ta)
- constructor: to a J text area
JTextAreaOutputStream
public JTextAreaOutputStream(javax.swing.JTextArea ta,
int size)
- constructor: the text area and size of the
buffer to use (none by default)
write
public void write(int b)
- implements the stream: writes the byte to the string buffer
- Overrides:
- write in class java.io.OutputStream
toString
public java.lang.String toString()
- returns the written string
- Overrides:
- toString in class java.lang.Object
flush
public void flush()
- overrides OutputStream.flush()
- Overrides:
- flush in class java.io.OutputStream