public class TracePrintStream extends IndentablePrintStream
Modifier and Type | Field and Description |
---|---|
static int |
INDENT_CHAR_NUMBER
number of spaces that should used per indentation
|
protected static String[] |
INDENT_STRING
string array that contains the indent strings
|
static int |
MAX_INDENT_NUMBER
indicates the maximum number of indentations
|
protected AbstractThreadMap |
threadMap
provides access to the tracing contexts indexed by thread objects
|
out
Constructor and Description |
---|
TracePrintStream()
Creates a new instance by passing a
NullOutputStream to the base class. |
TracePrintStream(OutputStream out,
AbstractThreadMap threadMap)
Creates a new instance of TracePrintStream by passing the given OutputStream to the underlying PrintStream.
|
Modifier and Type | Method and Description |
---|---|
Indentable |
printfIndentln(String format,
Object... args)
A convenience method to print an indented string onto the stream using the specified format string and the given arguments.
|
IndentablePrintStream |
printIndent(String s)
Prints an indented string.
|
IndentablePrintStream |
printIndentln(String s)
Prints an indented string together with a line feed.
|
IndentablePrintStream |
printIndentString()
Prints only the current indentation.
|
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write
write
public static final int MAX_INDENT_NUMBER
public static final int INDENT_CHAR_NUMBER
protected static final String[] INDENT_STRING
protected final AbstractThreadMap threadMap
public TracePrintStream()
NullOutputStream
to the base class.public TracePrintStream(OutputStream out, AbstractThreadMap threadMap)
out
- the underlying OutputStreamthreadMap
- to compute the indentation levelpublic IndentablePrintStream printIndent(String s)
Indentable
printIndent
in interface Indentable
printIndent
in class IndentablePrintStream
s
- the string to be printedpublic IndentablePrintStream printIndentln(String s)
Indentable
printIndentln
in interface Indentable
printIndentln
in class IndentablePrintStream
s
- the string to be printedpublic IndentablePrintStream printIndentString()
Indentable
printIndentString
in interface Indentable
printIndentString
in class IndentablePrintStream
public Indentable printfIndentln(String format, Object... args)
Indentable
printfIndentln
in interface Indentable
printfIndentln
in class IndentablePrintStream
format
- the format stringargs
- the to be printed argumentsCopyright © 2014 Christof Reichardt. All rights reserved. (Build: 26-May-2014)