org.devaki.nextobjects.util
Class LogWriter

java.lang.Object
  extended byjava.io.Writer
      extended byorg.devaki.nextobjects.util.LogWriter

public class LogWriter
extends java.io.Writer

LogWriter has the ability to forward the log4j output to a LogFrame class Inspired by Thomas Weber from OpenAI, http://openai.sourceforge.net/


Field Summary
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
LogWriter(JTextAreaOutputStream pjTextAreaOutputStream)
          Constructs a new LogWriter and registers the LogFrame
 
Method Summary
 void close()
          Mandatory close Method declaration
 void flush()
          Mandatory Method declaration
 void write(char[] parm1, int parm2, int parm3)
          Common flux write method
 void write(java.lang.String text)
          Append 'text' to the LogFrame textarea
 
Methods inherited from class java.io.Writer
write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogWriter

public LogWriter(JTextAreaOutputStream pjTextAreaOutputStream)
Constructs a new LogWriter and registers the LogFrame

Parameters:
pjTextAreaOutputStream - the textarea
Method Detail

write

public final void write(char[] parm1,
                        int parm2,
                        int parm3)
                 throws java.io.IOException
Common flux write method

Parameters:
parm1 - char array to be written
parm2 - start offset to be written
parm3 - number of char to write
Throws:
java.io.IOException - a standard io exception

flush

public void flush()
           throws java.io.IOException
Mandatory Method declaration

Throws:
java.io.IOException - a standard io exception

close

public void close()
           throws java.io.IOException
Mandatory close Method declaration

Throws:
java.io.IOException - a standard io exception

write

public final void write(java.lang.String text)
Append 'text' to the LogFrame textarea

Parameters:
text - the text


Copyright © 2002-2004 devaki.org. All Rights Reserved.