Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15
OOoRunner test harness

stats
Class InternalLogWriter

java.lang.Object
  |
  +--java.io.Writer
        |
        +--java.io.PrintWriter
              |
              +--stats.InternalLogWriter
All Implemented Interfaces:
LogWriter

public class InternalLogWriter
extends PrintWriter
implements LogWriter

Write all logs into a java.io.PrintWriter, i.e. a StringBuffer. Log is gathered there.


Fields inherited from class java.io.PrintWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
InternalLogWriter()
          c'*tor
 
Method Summary
 String getLog()
          Return all the written stuff.
 boolean initialize(DescEntry entry, boolean active)
          Initialization.
 void print(String msg)
          Method to print to the StringBuffer.
 void println(String msg)
          Method to print a line that is added to the StringBuffer.
 boolean summary(DescEntry entry)
          Is used to sum up the information.
 
Methods inherited from class java.io.PrintWriter
checkError, close, flush, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InternalLogWriter

public InternalLogWriter()
c'*tor
Method Detail

initialize

public boolean initialize(DescEntry entry,
                          boolean active)
Initialization.
Specified by:
initialize in interface LogWriter
Parameters:
entry - The description entry.
active - Logging is active.
Returns:
True, if initialize worked.

println

public void println(String msg)
Method to print a line that is added to the StringBuffer.
Specified by:
println in interface LogWriter
Overrides:
println in class PrintWriter
Parameters:
msg - The message that is printed.

print

public void print(String msg)
Method to print to the StringBuffer.
Overrides:
print in class PrintWriter
Parameters:
msg - The message that is printed.

summary

public boolean summary(DescEntry entry)
Is used to sum up the information. The summary is also added to the StringBuffer.
Specified by:
summary in interface LogWriter
Parameters:
entry - The description entry.
Returns:
True, if a summary could be created.

getLog

public String getLog()
Return all the written stuff.
Returns:
All that was written to the StringBuffer with the 'println()', 'print()' and 'summarize()' methods. The StringBuffer is emptied afterwards.

OOoRunner test harness

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.