Class CmdUtility


  • public class CmdUtility
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      CmdUtility()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int exec​(java.io.Writer writer, java.lang.String... command)
      Executes the specified string command in a separate process.
      • Methods inherited from class java.lang.Object

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

      • CmdUtility

        public CmdUtility()
    • Method Detail

      • exec

        public static int exec​(java.io.Writer writer,
                               java.lang.String... command)
                        throws java.io.IOException
        Executes the specified string command in a separate process. STDOUT and STDERR output will be buffered to the given writer ( Writer) argument.
        Parameters:
        writer - stdout and stderr output
        command - a specified system command
        Returns:
        exitValue 0: success, Non-zero: failure
        Throws:
        java.io.IOException