Class CmdUtility

java.lang.Object
org.apache.pulsar.utils.CmdUtility

public class CmdUtility extends Object
  • Constructor Details

    • CmdUtility

      public CmdUtility()
  • Method Details

    • exec

      public static int exec(Writer writer, String... command) throws 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:
      IOException