ch.claudio.lib
Class JTextAreaOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by ch.claudio.lib.JTextAreaOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public final class JTextAreaOutputStream
extends java.io.OutputStream

Writer which writes to a text area.

Version:
$Id: JTextAreaOutputStream.java 171 2007-03-25 01:23:20Z claudio $
Author:
Claudio Nieder

Copyright (C) 2005-2007 Claudio Nieder <private@claudio.ch>, CH-8610 Uster

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA


Field Summary
protected  javax.swing.JTextArea target
           
 
Constructor Summary
JTextAreaOutputStream(javax.swing.JTextArea targetArea)
           
 
Method Summary
 void close()
           
 void flush()
           
static void main(java.lang.String[] args)
          Print license.
 void write(byte[] cbuf)
           
 void write(byte[] cbuf, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

target

protected javax.swing.JTextArea target
Constructor Detail

JTextAreaOutputStream

public JTextAreaOutputStream(javax.swing.JTextArea targetArea)
Parameters:
targetArea - The JTextArea into which to write.
Method Detail

write

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

write

public void write(int b)
Specified by:
write in class java.io.OutputStream
See Also:
OutputStream.write(int)

write

public void write(byte[] cbuf)
Overrides:
write in class java.io.OutputStream
See Also:
OutputStream.write(byte[])

flush

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

close

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

main

public static void main(java.lang.String[] args)
Print license.

Parameters:
args - ignored