Class ManageOutputDevice

java.lang.Object
org.apache.uima.test.junit_extension.ManageOutputDevice

public class ManageOutputDevice extends Object
This class manupulates the output of the system. Methode output like System.out.println("blah") may be send to something else than the console.
  • Constructor Details

    • ManageOutputDevice

      public ManageOutputDevice()
  • Method Details

    • setSysOutToFile

      public static void setSysOutToFile(String descriptor) throws FileNotFoundException
      sets the System.out to a file based java.io.PrintStream
      Parameters:
      descriptor - a full qualified filename, see File(String pathname)
      Throws:
      FileNotFoundException - -
    • setSysOutToDefault

      public static void setSysOutToDefault()
      sets the System.out to the value, which was set, when the class was loaded by the VM.
    • setSysOutToNirvana

      public static void setSysOutToNirvana()
      sets the System.out to a virtual java.io.ByteArrayOutputStream
    • setSysErrToFile

      public static void setSysErrToFile(String descriptor) throws FileNotFoundException
      sets the System.err to a file based java.io.PrintStream
      Parameters:
      descriptor - -
      Throws:
      FileNotFoundException - -
    • setSysErrToDefault

      public static void setSysErrToDefault()
      sets the System.err to the value, which was set, when this class was loaded by the VM.
    • setSysErrToNirvana

      public static void setSysErrToNirvana()
      sets the System.err to a virtual java.io.ByteArrayOutputStream
    • setAllSystemOutputToNirvana

      public static void setAllSystemOutputToNirvana()
      sets the System.err and System.out to a virtual java.io.ByteArrayOutputStream
    • setAllSystemOutputToDefault

      public static void setAllSystemOutputToDefault()
      sets the System.err and System.out to their values, which were set, when this class was loaded.