Class NullPrintStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.PrintStream
de.christofreichardt.diagnosis.io.IndentablePrintStream
de.christofreichardt.diagnosis.io.NullPrintStream
- All Implemented Interfaces:
Indentable,Closeable,Flushable,Appendable,AutoCloseable
The tracer classes return such a NullPrintStream when the current state and the configuration demands that no output should be written. This is equivalent to a redirection to /dev/null.
- Author:
- Christof Reichardt
-
Field Summary
Fields inherited from class java.io.FilterOutputStream
out -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappend(char c) Pseudo append()-method.append(CharSequence csq) Pseudo append()-method.append(CharSequence csq, int start, int end) Pseudo append()-method.booleanIndicates always no error.protected voidPseudo clearError()-method.voidclose()Closes the underlying IndentablePrintStream.voidflush()Pseudo flush()-method.Pseudo format()-method.Pseudo format()-method.voidprint(boolean b) Pseudo print()-method.voidprint(char c) Pseudo print()-method.voidprint(char[] s) Pseudo print()-method.voidprint(double d) Pseudo print()-method.voidprint(float f) Pseudo print()-method.voidprint(int i) Pseudo print()-method.voidprint(long l) Pseudo print()-method.voidPseudo print()-method.voidPseudo print()-method.Pseudo printf()-method.Pseudo printf()-method.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.Prints an indented string.Prints an indented string together with a line feed.Prints only the current indentation.voidprintln()Pseudo println()-method.voidprintln(boolean x) Pseudo println()-method.voidprintln(char x) Pseudo println()-method.voidprintln(char[] x) Pseudo println()-method.voidprintln(double x) Pseudo println()-method.voidprintln(float x) Pseudo println()-method.voidprintln(int x) Pseudo println()-method.voidprintln(long x) Pseudo println()-method.voidPseudo println()-method.voidPseudo println()-method.protected voidsetError()Pseudo setError()-method.voidwrite(byte[] b) Pseudo write()-method.voidwrite(byte[] buf, int off, int len) Pseudo write()-method.voidwrite(int b) Pseudo write()-method.Methods inherited from class java.io.PrintStream
writeBytesMethods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
NullPrintStream
public NullPrintStream()
-
-
Method Details
-
printIndent
Description copied from interface:IndentablePrints an indented string.- Specified by:
printIndentin interfaceIndentable- Specified by:
printIndentin classIndentablePrintStream- 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- Specified by:
printIndentlnin classIndentablePrintStream- 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- Specified by:
printIndentStringin classIndentablePrintStream- 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- Specified by:
printfIndentlnin classIndentablePrintStream- Parameters:
format- the format stringargs- the to be printed arguments- Returns:
- the indentable stream itself
-
append
Pseudo append()-method.- Specified by:
appendin interfaceAppendable- Overrides:
appendin classPrintStream- Parameters:
csq- won't be evaluated- Returns:
- this indentable print stream
-
append
Pseudo append()-method.- Specified by:
appendin interfaceAppendable- Overrides:
appendin classPrintStream- Parameters:
csq- won't be evaluatedstart- won't be evaluatedend- won't be evaluated- Returns:
- this indentable print stream
-
append
Pseudo append()-method.- Specified by:
appendin interfaceAppendable- Overrides:
appendin classPrintStream- Parameters:
c- won't be evaluated- Returns:
- this indentable print stream
-
clearError
protected void clearError()Pseudo clearError()-method.- Overrides:
clearErrorin classPrintStream
-
checkError
public boolean checkError()Indicates always no error.- Overrides:
checkErrorin classPrintStream- Returns:
- always false
-
format
Pseudo format()-method.- Overrides:
formatin classPrintStream- Parameters:
l- won't be evaluatedformat- won't be evaluatedargs- won't be evaluated- Returns:
- this indentable print stream
-
format
Pseudo format()-method.- Overrides:
formatin classPrintStream- Parameters:
format- won't be evaluatedargs- won't be evaluated- Returns:
- this indentable print stream
-
print
public void print(char[] s) Pseudo print()-method.- Overrides:
printin classPrintStream- Parameters:
s- won't be evaluated
-
print
Pseudo print()-method.- Overrides:
printin classPrintStream- Parameters:
obj- won't be evaluated
-
print
public void print(char c) Pseudo print()-method.- Overrides:
printin classPrintStream- Parameters:
c- won't be evaluated
-
print
public void print(int i) Pseudo print()-method.- Overrides:
printin classPrintStream- Parameters:
i- won't be evaluated
-
print
Pseudo print()-method.- Overrides:
printin classPrintStream- Parameters:
s- won't be evaluated
-
print
public void print(boolean b) Pseudo print()-method.- Overrides:
printin classPrintStream- Parameters:
b- won't be evaluated
-
print
public void print(long l) Pseudo print()-method.- Overrides:
printin classPrintStream- Parameters:
l- won't be evaluated
-
print
public void print(double d) Pseudo print()-method.- Overrides:
printin classPrintStream- Parameters:
d- won't be evaluated
-
print
public void print(float f) Pseudo print()-method.- Overrides:
printin classPrintStream- Parameters:
f- won't be evaluated
-
printf
Pseudo printf()-method.- Overrides:
printfin classPrintStream- Parameters:
l- won't be evaluatedformat- won't be evaluatedargs- won't be evaluated- Returns:
- this indentable print stream
-
printf
Pseudo printf()-method.- Overrides:
printfin classPrintStream- Parameters:
format- won't be evaluatedargs- won't be evaluated- Returns:
- this indentable print stream
-
println
public void println(char[] x) Pseudo println()-method.- Overrides:
printlnin classPrintStream- Parameters:
x- won't be evaluated
-
println
public void println()Pseudo println()-method.- Overrides:
printlnin classPrintStream
-
println
Pseudo println()-method.- Overrides:
printlnin classPrintStream- Parameters:
x- won't be evaluated
-
println
public void println(char x) Pseudo println()-method.- Overrides:
printlnin classPrintStream- Parameters:
x- won't be evaluated
-
println
public void println(int x) Pseudo println()-method.- Overrides:
printlnin classPrintStream- Parameters:
x- won't be evaluated
-
println
Pseudo println()-method.- Overrides:
printlnin classPrintStream- Parameters:
x- won't be evaluated
-
println
public void println(boolean x) Pseudo println()-method.- Overrides:
printlnin classPrintStream- Parameters:
x- won't be evaluated
-
println
public void println(long x) Pseudo println()-method.- Overrides:
printlnin classPrintStream- Parameters:
x- won't be evaluated
-
println
public void println(double x) Pseudo println()-method.- Overrides:
printlnin classPrintStream- Parameters:
x- won't be evaluated
-
println
public void println(float x) Pseudo println()-method.- Overrides:
printlnin classPrintStream- Parameters:
x- won't be evaluated
-
setError
protected void setError()Pseudo setError()-method.- Overrides:
setErrorin classPrintStream
-
write
public void write(int b) Pseudo write()-method.- Overrides:
writein classPrintStream- Parameters:
b- won't be evaluated
-
write
public void write(byte[] buf, int off, int len) Pseudo write()-method.- Overrides:
writein classPrintStream- Parameters:
buf- won't be evaluatedoff- won't be evaluatedlen- won't be evaluated
-
write
public void write(byte[] b) Pseudo write()-method.- Overrides:
writein classPrintStream- Parameters:
b- won't be evaluated
-
flush
public void flush()Pseudo flush()-method.- Specified by:
flushin interfaceFlushable- Overrides:
flushin classPrintStream
-
close
public void close()Closes the underlying IndentablePrintStream.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classPrintStream
-