Class RedirectionKt

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static String redirectStderr(Function0<Unit> block) Redirect the standard error stream to a String during the execution of block.
      final static String redirectStdout(Function0<Unit> block) Redirect the standard output stream to a String during the execution of block.
      final static <T extends Any> T suppressInput(Function0<T> block) Suppress any prompts for input by redirecting standard input to the null device.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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.