|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectWriter
TraceWriter
public class TraceWriter
This is a simple PrintStream derivative that sends its output to the XTF Trace class instead of stdout or stderr.
| Field Summary | |
|---|---|
private StringBuffer |
buf
Buffer to build up each line, flushed at newline |
private int |
traceLevel
What level to output messages at |
| Fields inherited from class Writer |
|---|
lock |
| Constructor Summary | |
|---|---|
TraceWriter(int traceLevel)
Construct a TraceWriter, recording the Trace level that future messages written to the stream will be output at. |
|
| Method Summary | |
|---|---|
void |
close()
Close the stream |
void |
flush()
Flush any remaining output in the buffer |
private void |
output(String str)
Output a string at the configured debug level |
void |
write(char[] cbuf,
int off,
int len)
Write a series of characters. |
| Methods inherited from class Writer |
|---|
append, append, append, write, write, write, write |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private int traceLevel
private StringBuffer buf
| Constructor Detail |
|---|
public TraceWriter(int traceLevel)
traceLevel - Level to output future messages.| Method Detail |
|---|
public void write(char[] cbuf,
int off,
int len)
throws IOException
write in class WriterIOExceptionprivate void output(String str)
public void flush()
throws IOException
flush in interface Flushableflush in class WriterIOException
public void close()
throws IOException
close in interface Closeableclose in class WriterIOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||