org.apache.jackrabbit.test
Class LogPrintWriter
java.lang.Object
java.io.Writer
java.io.PrintWriter
org.apache.jackrabbit.test.LogPrintWriter
- All Implemented Interfaces:
- Closeable, Flushable, Appendable
public class LogPrintWriter
- extends PrintWriter
Implements a PrintWriter which allows to alternatively plug in a
Writer or a Logger.
|
Constructor Summary |
LogPrintWriter(org.slf4j.Logger log)
Creates a new LogPrintWriter which is based on a
Logger. |
LogPrintWriter(Writer out)
Creates a new LogPrintWriter which is based on a
Writer. |
| Methods inherited from class java.io.PrintWriter |
append, append, append, checkError, clearError, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, setError, write, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LogPrintWriter
public LogPrintWriter(Writer out)
- Creates a new
LogPrintWriter which is based on a
Writer.
- Parameters:
out - the base Writer.
LogPrintWriter
public LogPrintWriter(org.slf4j.Logger log)
- Creates a new
LogPrintWriter which is based on a
Logger.
- Parameters:
log - the base Logger.
setWriter
public void setWriter(Writer out)
- Sets a new output
Writer. Calling this method will flush
this LogPrintWriter before the new Writer
out is set.
- Parameters:
out - the Writer to use for output.
setLogger
public void setLogger(org.slf4j.Logger log)
- Sets a new
Logger. Calling this method will flush this
LogPrintWriter before the new Logger is set.
- Parameters:
log - the new Logger to use for output.
close
public void close()
- Specified by:
close in interface Closeable- Overrides:
close in class PrintWriter
flush
public void flush()
- Specified by:
flush in interface Flushable- Overrides:
flush in class PrintWriter
write
public void write(int c)
- Overrides:
write in class PrintWriter
write
public void write(char[] cbuf,
int off,
int len)
- Overrides:
write in class PrintWriter
write
public void write(String str,
int off,
int len)
- Overrides:
write in class PrintWriter
println
public void println()
- Overrides:
println in class PrintWriter
Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.