Class StandardOutputStreams


  • public class StandardOutputStreams
    extends java.lang.Object
    Caches stdout and stderr early.
    Author:
    James R. Perkins
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.io.PrintStream stderr  
      static java.io.PrintStream stdout  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void printError​(java.lang.String msg)
      Prints an error messages to stderr.
      static void printError​(java.lang.String format, java.lang.Object... args)
      Prints an error messages to stderr.
      static void printError​(java.lang.Throwable cause, java.lang.String msg)
      Prints an error messages to stderr.
      static void printError​(java.lang.Throwable cause, java.lang.String format, java.lang.Object... args)
      Prints an error messages to stderr.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • stdout

        public static final java.io.PrintStream stdout
      • stderr

        public static final java.io.PrintStream stderr
    • Constructor Detail

      • StandardOutputStreams

        public StandardOutputStreams()
    • Method Detail

      • printError

        public static void printError​(java.lang.String msg)
        Prints an error messages to stderr.
        Parameters:
        msg - the message to print
      • printError

        public static void printError​(java.lang.String format,
                                      java.lang.Object... args)
        Prints an error messages to stderr.
        Parameters:
        format - the format
        args - the arguments for the format
      • printError

        public static void printError​(java.lang.Throwable cause,
                                      java.lang.String msg)
        Prints an error messages to stderr.
        Parameters:
        cause - the cause of the error, if not null the Throwable.printStackTrace(PrintStream) writes to stderr
        msg - the message to print
      • printError

        public static void printError​(java.lang.Throwable cause,
                                      java.lang.String format,
                                      java.lang.Object... args)
        Prints an error messages to stderr.
        Parameters:
        cause - the cause of the error, if not null the Throwable.printStackTrace(PrintStream) writes to stderr
        format - the format
        args - the arguments for the format