Class ManageOutputDevice
- java.lang.Object
-
- org.apache.uima.test.junit_extension.ManageOutputDevice
-
public class ManageOutputDevice extends java.lang.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 Summary
Constructors Constructor Description ManageOutputDevice()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
setAllSystemOutputToDefault()
sets theSystem.err
andSystem.out
to their values, which were set, when this class was loaded.static void
setAllSystemOutputToNirvana()
sets theSystem.err
andSystem.out
to a virtualjava.io.ByteArrayOutputStream
static void
setSysErrToDefault()
sets theSystem.err
to the value, which was set, when this class was loaded by the VM.static void
setSysErrToFile(java.lang.String descriptor)
sets theSystem.err
to a file basedjava.io.PrintStream
static void
setSysErrToNirvana()
sets theSystem.err
to a virtualjava.io.ByteArrayOutputStream
static void
setSysOutToDefault()
sets theSystem.out
to the value, which was set, when the class was loaded by the VM.static void
setSysOutToFile(java.lang.String descriptor)
sets theSystem.out
to a file basedjava.io.PrintStream
static void
setSysOutToNirvana()
sets theSystem.out
to a virtualjava.io.ByteArrayOutputStream
-
-
-
Method Detail
-
setSysOutToFile
public static void setSysOutToFile(java.lang.String descriptor) throws java.io.FileNotFoundException
sets theSystem.out
to a file basedjava.io.PrintStream
- Parameters:
descriptor
- a full qualified filename, seeFile(String pathname)
- Throws:
java.io.FileNotFoundException
- -
-
setSysOutToDefault
public static void setSysOutToDefault()
sets theSystem.out
to the value, which was set, when the class was loaded by the VM.
-
setSysOutToNirvana
public static void setSysOutToNirvana()
sets theSystem.out
to a virtualjava.io.ByteArrayOutputStream
-
setSysErrToFile
public static void setSysErrToFile(java.lang.String descriptor) throws java.io.FileNotFoundException
sets theSystem.err
to a file basedjava.io.PrintStream
- Parameters:
descriptor
- -- Throws:
java.io.FileNotFoundException
- -
-
setSysErrToDefault
public static void setSysErrToDefault()
sets theSystem.err
to the value, which was set, when this class was loaded by the VM.
-
setSysErrToNirvana
public static void setSysErrToNirvana()
sets theSystem.err
to a virtualjava.io.ByteArrayOutputStream
-
setAllSystemOutputToNirvana
public static void setAllSystemOutputToNirvana()
sets theSystem.err
andSystem.out
to a virtualjava.io.ByteArrayOutputStream
-
setAllSystemOutputToDefault
public static void setAllSystemOutputToDefault()
sets theSystem.err
andSystem.out
to their values, which were set, when this class was loaded.
-
-