|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.townleyenterprises.trace.FileTraceStream
This class provides an implementation of the TraceStream interface in terms of a system file.
Constructor Summary | |
FileTraceStream(java.lang.String filename,
boolean append)
The constructor takes the name of the file and the append mode for the output stream. |
Method Summary | |
void |
close()
This method closes the trace stream. |
java.io.PrintStream |
getPrintStream()
This method returns the print stream associated with this output. |
void |
print(java.lang.Object message)
This method writes the message to the trace output, but doesn't include the newline. |
void |
println(java.lang.Object message)
This method writes a line to the trace output. |
void |
printStackTrace(java.lang.Throwable ex)
This method is used to write an exception's stack trace to the trace output. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FileTraceStream(java.lang.String filename, boolean append) throws java.io.IOException
filename
- the name of the fileappend
- true to append; false to overwrite
java.io.IOException
- if there was a problem creating the fileMethod Detail |
public void print(java.lang.Object message)
print
in interface TraceStream
message
- the message to writepublic void println(java.lang.Object message)
println
in interface TraceStream
message
- the message to writepublic void printStackTrace(java.lang.Throwable ex)
printStackTrace
in interface TraceStream
ex
- the exception to printpublic java.io.PrintStream getPrintStream()
getPrintStream
in interface TraceStream
public void close()
close
in interface TraceStream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |