net.grinder.testutility
Class RedirectStandardStreams

java.lang.Object
  extended by net.grinder.testutility.RedirectStandardStreams

public abstract class RedirectStandardStreams
extends Object

Utility template which redirects and restores stdout and stderr.

Author:
Philip Aston

Constructor Summary
RedirectStandardStreams()
           
 
Method Summary
 RedirectStandardStreams assertNoStderr()
           
 RedirectStandardStreams assertNoStdout()
           
 byte[] getStderrBytes()
           
 byte[] getStdoutBytes()
           
 RedirectStandardStreams run()
           
protected abstract  void runWithRedirectedStreams()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RedirectStandardStreams

public RedirectStandardStreams()
Method Detail

run

public final RedirectStandardStreams run()
                                  throws Exception
Throws:
Exception

assertNoStdout

public final RedirectStandardStreams assertNoStdout()

assertNoStderr

public final RedirectStandardStreams assertNoStderr()

getStdoutBytes

public final byte[] getStdoutBytes()

getStderrBytes

public final byte[] getStderrBytes()

runWithRedirectedStreams

protected abstract void runWithRedirectedStreams()
                                          throws Exception
Throws:
Exception

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2000-2012. All Rights Reserved.