|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.groovy.maven.common.SystemOutputHijacker
public class SystemOutputHijacker
Hijacks the systems standard output and error streams on a per-thread basis and redirects to given streams.
Constructor Summary | |
---|---|
SystemOutputHijacker()
|
Method Summary | |
---|---|
static void |
deregister()
Reregister streams for the current thread, and restore the previous if any. |
static void |
install()
Install the hijacker. |
static void |
install(java.io.PrintStream out)
Install the hijacker and register combinded streams for the current thread. |
static void |
install(java.io.PrintStream out,
java.io.PrintStream err)
Install the hijacker and register streams for the current thread. |
static boolean |
isInstalled()
Check if the hijacker has been installed. |
static boolean |
isRegistered()
Check if there are streams registered for the current thread. |
static void |
register(java.io.PrintStream out)
Register combinded streams for the current thread. |
static void |
register(java.io.PrintStream out,
java.io.PrintStream err)
Register streams for the current thread. |
static void |
register(StreamPair pair)
Register streams for the current thread. |
static void |
restore()
Restores the original System streams from StreamPair.SYSTEM and resets
the hijacker state to uninstalled. |
static void |
restore(StreamPair streams)
Restores the System streams to the given pair and resets the hijacker state to uninstalled. |
static void |
uninstall()
Uninstall the hijacker. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SystemOutputHijacker()
Method Detail |
---|
public static boolean isInstalled()
public static void install()
public static void install(java.io.PrintStream out, java.io.PrintStream err)
public static void install(java.io.PrintStream out)
public static void uninstall()
public static boolean isRegistered()
public static void register(java.io.PrintStream out, java.io.PrintStream err)
public static void register(java.io.PrintStream out)
public static void register(StreamPair pair)
public static void deregister()
public static void restore(StreamPair streams)
public static void restore()
StreamPair.SYSTEM
and resets
the hijacker state to uninstalled.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |