code: public static CaptureStreamHandler execute(final String[] cmdline) {
      final CaptureStreamHandler handler = new CaptureStreamHandler();
      final Execute exec = new Execute(handler);
      exec.setCommandline(cmdline);
      try {
        final int status = exec.execute();
      } catch (final IOException ex) {
      }
      return handler;
    }
docs: Executes the given command, capturing the output using a newly allocated
  {@link CaptureStreamHandler}, which is then returned.
  <p>
  In contrast to {@link #run(String[])}, this method allows both the standard
  error and standard output streams to be inspected after execution (via the
  {@link #getStderr()} and {@link #getStdout()} methods, respectively).
  </p>
  
  @param cmdline
  command line arguments
  @return The {@link CaptureStreamHandler} used to capture the output.