|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.test.io.SystemOutAndErrSwapper
class SystemOutAndErrSwapper extends java.lang.Object
Convenience class to temporarily swap in an output stream for standard error and standard out.
Field Summary | |
---|---|
protected boolean |
swapped
|
protected java.io.PrintStream |
swappedInErr
|
protected java.io.OutputStream |
swappedInErrStream
|
protected java.io.PrintStream |
swappedInOut
|
protected java.io.OutputStream |
swappedInOutStream
|
protected java.io.PrintStream |
swappedOutErr
|
protected java.io.PrintStream |
swappedOutOut
|
Property Summary | |
---|---|
boolean |
echoErr
|
boolean |
echoOut
|
Constructor Summary | |
SystemOutAndErrSwapper(boolean echoOut = false, boolean echoErr = false)
|
Method Summary | |
---|---|
java.util.List
|
swapIn()
Replaces System.out and System.err with PrintStream's wrapping outStream and errStream |
java.util.List
|
swapIn(java.io.OutputStream outStream, java.io.OutputStream errStream)
Replaces System.out and System.err with PrintStream's wrapping outStream and errStream |
java.util.List
|
swapOut()
Restores System.out and System.err to what they were before swappedIn() was called. |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Field Detail |
---|
protected boolean swapped
protected java.io.PrintStream swappedInErr
protected java.io.OutputStream swappedInErrStream
protected java.io.PrintStream swappedInOut
protected java.io.OutputStream swappedInOutStream
protected java.io.PrintStream swappedOutErr
protected java.io.PrintStream swappedOutOut
Property Detail |
---|
final boolean echoErr
final boolean echoOut
Constructor Detail |
---|
SystemOutAndErrSwapper(boolean echoOut = false, boolean echoErr = false)
Method Detail |
---|
java.util.List swapIn()
java.util.List swapIn(java.io.OutputStream outStream, java.io.OutputStream errStream)
java.util.List swapOut()
Groovy Documentation