com.lowagie.rups.io
Class TextAreaOutputStream

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

public class TextAreaOutputStream
extends java.io.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  javax.swing.JTextArea text
          The text area to which we want to write.
 
Constructor Summary
TextAreaOutputStream(javax.swing.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 javax.swing.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(javax.swing.JTextArea text)
                     throws java.io.IOException
Constructs a TextAreaOutputStream.

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

clear

public void clear()
Clear the text area.


write

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

write

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

write

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


iText 2.1.7