Class FileOutput

  • All Implemented Interfaces:
    DebugSink, Output

    public final class FileOutput
    extends Object
    implements Output
    Directs output to a file. Lazy initialization; the file is not actually opened until output is sent.
    • Constructor Detail

      • FileOutput

        public FileOutput​(File f)
      • FileOutput

        public FileOutput​(File f,
                          boolean append)
    • Method Detail

      • print

        public void print​(Object o)
        Description copied from interface: Output
        Output a message without a newline.
        Specified by:
        print in interface DebugSink
        Specified by:
        print in interface Output
        Parameters:
        o - the Object to output
      • println

        public void println​(Object o)
        Description copied from interface: Output
        Output a message with a newline.
        Specified by:
        println in interface DebugSink
        Specified by:
        println in interface Output
        Parameters:
        o - the Object to output
      • printError

        public void printError​(Object o)
        Description copied from interface: Output
        Output a message to error output
        Specified by:
        printError in interface Output
        Parameters:
        o - the Object to output
      • getDebug

        public boolean getDebug()
      • printDebug

        public void printDebug​(Object o)
        Description copied from interface: Output
        Output a debug error message if getDebug() is currently true.
        Specified by:
        printDebug in interface Output
        Parameters:
        o - the Object to output
      • close

        public void close()
        Description copied from interface: Output
        Done with it, can be destroyed.
        Specified by:
        close in interface Output