Package org.apache.jasper.compiler
Class AntCompiler.SystemLogHandler
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.PrintStream
org.apache.jasper.compiler.AntCompiler.SystemLogHandler
- All Implemented Interfaces:
- Closeable,- Flushable,- Appendable,- AutoCloseable
- Enclosing class:
- AntCompiler
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected static final ThreadLocal<ByteArrayOutputStream>Thread <-> ByteArrayOutputStream associations.protected static final ThreadLocal<PrintStream>Thread <-> PrintStream associations.protected final PrintStreamWrapped PrintStream.Fields inherited from class java.io.FilterOutputStreamout
- 
Constructor SummaryConstructorsConstructorDescriptionSystemLogHandler(PrintStream wrapped) Construct the handler to capture the output of the given steam.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanvoidclose()protected PrintStreamFind PrintStream to which the output must be written to.voidflush()voidprint(boolean b) voidprint(char c) voidprint(char[] s) voidprint(double d) voidprint(float f) voidprint(int i) voidprint(long l) voidvoidvoidprintln()voidprintln(boolean x) voidprintln(char x) voidprintln(char[] x) voidprintln(double x) voidprintln(float x) voidprintln(int x) voidprintln(long x) voidvoidprotected voidsetError()static voidStart capturing thread's output.static StringStop capturing thread's output and return captured data as a String.voidwrite(byte[] b) voidwrite(byte[] buf, int off, int len) voidwrite(int b) Methods inherited from class java.io.PrintStreamappend, append, append, clearError, format, format, printf, printf, writeBytesMethods inherited from class java.io.OutputStreamnullOutputStream
- 
Field Details- 
wrappedWrapped PrintStream.
- 
streamsThread <-> PrintStream associations.
- 
dataThread <-> ByteArrayOutputStream associations.
 
- 
- 
Constructor Details- 
SystemLogHandlerConstruct the handler to capture the output of the given steam.- Parameters:
- wrapped- The wrapped stream
 
 
- 
- 
Method Details- 
setThreadpublic static void setThread()Start capturing thread's output.
- 
unsetThreadStop capturing thread's output and return captured data as a String.- Returns:
- the captured output
 
- 
findStreamFind PrintStream to which the output must be written to.- Returns:
- the current stream
 
- 
flushpublic void flush()- Specified by:
- flushin interface- Flushable
- Overrides:
- flushin class- PrintStream
 
- 
closepublic void close()- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- PrintStream
 
- 
checkErrorpublic boolean checkError()- Overrides:
- checkErrorin class- PrintStream
 
- 
setErrorprotected void setError()- Overrides:
- setErrorin class- PrintStream
 
- 
writepublic void write(int b) - Overrides:
- writein class- PrintStream
 
- 
write- Overrides:
- writein class- PrintStream
- Throws:
- IOException
 
- 
writepublic void write(byte[] buf, int off, int len) - Overrides:
- writein class- PrintStream
 
- 
printpublic void print(boolean b) - Overrides:
- printin class- PrintStream
 
- 
printpublic void print(char c) - Overrides:
- printin class- PrintStream
 
- 
printpublic void print(int i) - Overrides:
- printin class- PrintStream
 
- 
printpublic void print(long l) - Overrides:
- printin class- PrintStream
 
- 
printpublic void print(float f) - Overrides:
- printin class- PrintStream
 
- 
printpublic void print(double d) - Overrides:
- printin class- PrintStream
 
- 
printpublic void print(char[] s) - Overrides:
- printin class- PrintStream
 
- 
print- Overrides:
- printin class- PrintStream
 
- 
print- Overrides:
- printin class- PrintStream
 
- 
printlnpublic void println()- Overrides:
- printlnin class- PrintStream
 
- 
printlnpublic void println(boolean x) - Overrides:
- printlnin class- PrintStream
 
- 
printlnpublic void println(char x) - Overrides:
- printlnin class- PrintStream
 
- 
printlnpublic void println(int x) - Overrides:
- printlnin class- PrintStream
 
- 
printlnpublic void println(long x) - Overrides:
- printlnin class- PrintStream
 
- 
printlnpublic void println(float x) - Overrides:
- printlnin class- PrintStream
 
- 
printlnpublic void println(double x) - Overrides:
- printlnin class- PrintStream
 
- 
printlnpublic void println(char[] x) - Overrides:
- printlnin class- PrintStream
 
- 
println- Overrides:
- printlnin class- PrintStream
 
- 
println- Overrides:
- printlnin class- PrintStream
 
 
-