Class NullPrintStream

All Implemented Interfaces:
Indentable, Closeable, Flushable, Appendable, AutoCloseable

public final class NullPrintStream extends IndentablePrintStream
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
  • Constructor Details

    • NullPrintStream

      public NullPrintStream()
  • Method Details

    • printIndent

      public IndentablePrintStream printIndent(String s)
      Description copied from interface: Indentable
      Prints an indented string.
      Specified by:
      printIndent in interface Indentable
      Specified by:
      printIndent in class IndentablePrintStream
      Parameters:
      s - the string to be printed
      Returns:
      the indentable stream itself
    • printIndentln

      public IndentablePrintStream printIndentln(String s)
      Description copied from interface: Indentable
      Prints an indented string together with a line feed.
      Specified by:
      printIndentln in interface Indentable
      Specified by:
      printIndentln in class IndentablePrintStream
      Parameters:
      s - the string to be printed
      Returns:
      the indentable stream itself
    • printIndentString

      public IndentablePrintStream printIndentString()
      Description copied from interface: Indentable
      Prints only the current indentation.
      Specified by:
      printIndentString in interface Indentable
      Specified by:
      printIndentString in class IndentablePrintStream
      Returns:
      the indentable stream itself
    • printfIndentln

      public Indentable printfIndentln(String format, Object... args)
      Description copied from interface: Indentable
      A convenience method to print an indented string onto the stream using the specified format string and the given arguments.
      Specified by:
      printfIndentln in interface Indentable
      Specified by:
      printfIndentln in class IndentablePrintStream
      Parameters:
      format - the format string
      args - the to be printed arguments
      Returns:
      the indentable stream itself
    • append

      public IndentablePrintStream append(CharSequence csq)
      Pseudo append()-method.
      Specified by:
      append in interface Appendable
      Overrides:
      append in class PrintStream
      Parameters:
      csq - won't be evaluated
      Returns:
      this indentable print stream
    • append

      public IndentablePrintStream append(CharSequence csq, int start, int end)
      Pseudo append()-method.
      Specified by:
      append in interface Appendable
      Overrides:
      append in class PrintStream
      Parameters:
      csq - won't be evaluated
      start - won't be evaluated
      end - won't be evaluated
      Returns:
      this indentable print stream
    • append

      public IndentablePrintStream append(char c)
      Pseudo append()-method.
      Specified by:
      append in interface Appendable
      Overrides:
      append in class PrintStream
      Parameters:
      c - won't be evaluated
      Returns:
      this indentable print stream
    • clearError

      protected void clearError()
      Pseudo clearError()-method.
      Overrides:
      clearError in class PrintStream
    • checkError

      public boolean checkError()
      Indicates always no error.
      Overrides:
      checkError in class PrintStream
      Returns:
      always false
    • format

      public IndentablePrintStream format(Locale l, String format, Object... args)
      Pseudo format()-method.
      Overrides:
      format in class PrintStream
      Parameters:
      l - won't be evaluated
      format - won't be evaluated
      args - won't be evaluated
      Returns:
      this indentable print stream
    • format

      public IndentablePrintStream format(String format, Object... args)
      Pseudo format()-method.
      Overrides:
      format in class PrintStream
      Parameters:
      format - won't be evaluated
      args - won't be evaluated
      Returns:
      this indentable print stream
    • print

      public void print(char[] s)
      Pseudo print()-method.
      Overrides:
      print in class PrintStream
      Parameters:
      s - won't be evaluated
    • print

      public void print(Object obj)
      Pseudo print()-method.
      Overrides:
      print in class PrintStream
      Parameters:
      obj - won't be evaluated
    • print

      public void print(char c)
      Pseudo print()-method.
      Overrides:
      print in class PrintStream
      Parameters:
      c - won't be evaluated
    • print

      public void print(int i)
      Pseudo print()-method.
      Overrides:
      print in class PrintStream
      Parameters:
      i - won't be evaluated
    • print

      public void print(String s)
      Pseudo print()-method.
      Overrides:
      print in class PrintStream
      Parameters:
      s - won't be evaluated
    • print

      public void print(boolean b)
      Pseudo print()-method.
      Overrides:
      print in class PrintStream
      Parameters:
      b - won't be evaluated
    • print

      public void print(long l)
      Pseudo print()-method.
      Overrides:
      print in class PrintStream
      Parameters:
      l - won't be evaluated
    • print

      public void print(double d)
      Pseudo print()-method.
      Overrides:
      print in class PrintStream
      Parameters:
      d - won't be evaluated
    • print

      public void print(float f)
      Pseudo print()-method.
      Overrides:
      print in class PrintStream
      Parameters:
      f - won't be evaluated
    • printf

      public IndentablePrintStream printf(Locale l, String format, Object... args)
      Pseudo printf()-method.
      Overrides:
      printf in class PrintStream
      Parameters:
      l - won't be evaluated
      format - won't be evaluated
      args - won't be evaluated
      Returns:
      this indentable print stream
    • printf

      public IndentablePrintStream printf(String format, Object... args)
      Pseudo printf()-method.
      Overrides:
      printf in class PrintStream
      Parameters:
      format - won't be evaluated
      args - won't be evaluated
      Returns:
      this indentable print stream
    • println

      public void println(char[] x)
      Pseudo println()-method.
      Overrides:
      println in class PrintStream
      Parameters:
      x - won't be evaluated
    • println

      public void println()
      Pseudo println()-method.
      Overrides:
      println in class PrintStream
    • println

      public void println(Object x)
      Pseudo println()-method.
      Overrides:
      println in class PrintStream
      Parameters:
      x - won't be evaluated
    • println

      public void println(char x)
      Pseudo println()-method.
      Overrides:
      println in class PrintStream
      Parameters:
      x - won't be evaluated
    • println

      public void println(int x)
      Pseudo println()-method.
      Overrides:
      println in class PrintStream
      Parameters:
      x - won't be evaluated
    • println

      public void println(String x)
      Pseudo println()-method.
      Overrides:
      println in class PrintStream
      Parameters:
      x - won't be evaluated
    • println

      public void println(boolean x)
      Pseudo println()-method.
      Overrides:
      println in class PrintStream
      Parameters:
      x - won't be evaluated
    • println

      public void println(long x)
      Pseudo println()-method.
      Overrides:
      println in class PrintStream
      Parameters:
      x - won't be evaluated
    • println

      public void println(double x)
      Pseudo println()-method.
      Overrides:
      println in class PrintStream
      Parameters:
      x - won't be evaluated
    • println

      public void println(float x)
      Pseudo println()-method.
      Overrides:
      println in class PrintStream
      Parameters:
      x - won't be evaluated
    • setError

      protected void setError()
      Pseudo setError()-method.
      Overrides:
      setError in class PrintStream
    • write

      public void write(int b)
      Pseudo write()-method.
      Overrides:
      write in class PrintStream
      Parameters:
      b - won't be evaluated
    • write

      public void write(byte[] buf, int off, int len)
      Pseudo write()-method.
      Overrides:
      write in class PrintStream
      Parameters:
      buf - won't be evaluated
      off - won't be evaluated
      len - won't be evaluated
    • write

      public void write(byte[] b)
      Pseudo write()-method.
      Overrides:
      write in class PrintStream
      Parameters:
      b - won't be evaluated
    • flush

      public void flush()
      Pseudo flush()-method.
      Specified by:
      flush in interface Flushable
      Overrides:
      flush in class PrintStream
    • close

      public void close()
      Closes the underlying IndentablePrintStream.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class PrintStream