Class RedirectionKt
-
- All Implemented Interfaces:
public final class RedirectionKt
-
-
Method Summary
Modifier and Type Method Description final static StringredirectStderr(Function0<Unit> block)Redirect the standard error stream to a String during the execution of block. final static StringredirectStdout(Function0<Unit> block)Redirect the standard output stream to a String during the execution of block. final static <T extends Any> TsuppressInput(Function0<T> block)Suppress any prompts for input by redirecting standard input to the null device. -
-
Method Detail
-
redirectStderr
final static String redirectStderr(Function0<Unit> block)
Redirect the standard error stream to a String during the execution of block.
-
redirectStdout
final static String redirectStdout(Function0<Unit> block)
Redirect the standard output stream to a String during the execution of block.
-
suppressInput
final static <T extends Any> T suppressInput(Function0<T> block)
Suppress any prompts for input by redirecting standard input to the null device.
-
-
-
-