Package pal.io

Class OutputTarget

All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable

public class OutputTarget extends PrintWriter
convenience class to create output streams linked to files, stdout, and strings
Version:
$Id: OutputTarget.java,v 1.3 2001/07/13 14:39:13 korbinian Exp $
Author:
Korbinian Strimmer
  • Method Details

    • openFile

      public static OutputTarget openFile(String name) throws IOException
      open file for writing
      Parameters:
      name - file name
      Returns:
      output stream
      Throws:
      IOException
    • openStdOut

      public static OutputTarget openStdOut()
      open standard out
      Returns:
      output stream
    • openString

      public static OutputTarget openString()
      "open" string to write into
      Returns:
      output stream
    • getString

      public String getString()
      get string corresponding to current stream created by openString()
      Returns:
      string