com.lowagie.rups.io
Class TextAreaOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by com.lowagie.rups.io.TextAreaOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class TextAreaOutputStream
extends OutputStream

Everything writing to this OutputStream will be shown in a JTextArea.


Field Summary
protected  int offset
          Keeps track of the offset of the text in the text area.
protected  JTextArea text
          The text area to which we want to write.
 
Constructor Summary
TextAreaOutputStream(JTextArea text)
          Constructs a TextAreaOutputStream.
 
Method Summary
 void clear()
          Clear the text area.
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int i)
           
 
Methods inherited from class java.io.OutputStream
close, flush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

text

protected JTextArea text
The text area to which we want to write.


offset

protected int offset
Keeps track of the offset of the text in the text area.

Constructor Detail

TextAreaOutputStream

public TextAreaOutputStream(JTextArea text)
                     throws IOException
Constructs a TextAreaOutputStream.

Parameters:
text - the text area to which we want to write.
Throws:
IOException
Method Detail

clear

public void clear()
Clear the text area.


write

public void write(int i)
           throws IOException
Specified by:
write in class OutputStream
Throws:
IOException
See Also:
OutputStream.write(int)

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class OutputStream
Throws:
IOException
See Also:
OutputStream.write(byte[], int, int)

write

public void write(byte[] b)
           throws IOException
Overrides:
write in class OutputStream
Throws:
IOException
See Also:
OutputStream.write(byte[])

Hosted by Hostbasket