Class IndentablePrintStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.PrintStream
de.christofreichardt.diagnosis.io.IndentablePrintStream
- All Implemented Interfaces:
Indentable,Closeable,Flushable,Appendable,AutoCloseable
- Direct Known Subclasses:
NullPrintStream,TracePrintStream
The base class of all indentable print streams.
- Author:
- Christof Reichardt
-
Field Summary
Fields inherited from class java.io.FilterOutputStream
out -
Constructor Summary
ConstructorsConstructorDescriptionThis constructor passes the given OutputStream to the underlying PrintStream implementation. -
Method Summary
Modifier and TypeMethodDescriptionabstract IndentableprintfIndentln(String format, Object... args) A convenience method to print an indented string onto the stream using the specified format string and the given arguments.abstract IndentablePrintStreamPrints an indented string.abstract IndentablePrintStreamPrints an indented string together with a line feed.abstract IndentablePrintStreamPrints only the current indentation.Methods inherited from class java.io.PrintStream
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, writeBytesMethods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
IndentablePrintStream
This constructor passes the given OutputStream to the underlying PrintStream implementation.- Parameters:
out- the desired OutputStream
-
-
Method Details
-
printIndent
Description copied from interface:IndentablePrints an indented string.- Specified by:
printIndentin interfaceIndentable- Parameters:
s- the string to be printed- Returns:
- the indentable stream itself
-
printIndentln
Description copied from interface:IndentablePrints an indented string together with a line feed.- Specified by:
printIndentlnin interfaceIndentable- Parameters:
s- the string to be printed- Returns:
- the indentable stream itself
-
printIndentString
Description copied from interface:IndentablePrints only the current indentation.- Specified by:
printIndentStringin interfaceIndentable- Returns:
- the indentable stream itself
-
printfIndentln
Description copied from interface:IndentableA convenience method to print an indented string onto the stream using the specified format string and the given arguments.- Specified by:
printfIndentlnin interfaceIndentable- Parameters:
format- the format stringargs- the to be printed arguments- Returns:
- the indentable stream itself
-