Class ExecHelper


  • public final class ExecHelper
    extends java.lang.Object
    Helper methods for running unix commands.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ExecHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static void close​(java.io.Closeable... closeables)  
      static java.lang.String exec​(boolean redirectInput, java.lang.String... cmd)  
      static java.lang.String waitAndCapture​(java.lang.Process p)  
      • Methods inherited from class java.lang.Object

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

      • ExecHelper

        private ExecHelper()
    • Method Detail

      • exec

        public static java.lang.String exec​(boolean redirectInput,
                                            java.lang.String... cmd)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • waitAndCapture

        public static java.lang.String waitAndCapture​(java.lang.Process p)
                                               throws java.io.IOException,
                                                      java.lang.InterruptedException
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • close

        private static void close​(java.io.Closeable... closeables)