code: public static Response execute(int maxBuffer, String ... command) {
  
          if(command.length == 0){
              throw new IllegalArgumentException("Command must be provided.");
          }
  
          String[]  commandAndArgs = command.length == 1 && command[0].contains(" ") ? Util.split(command[0], " ") : command;
  
          try {
              Process process = Runtime.getRuntime().exec(commandAndArgs);
  
              OutputReader stdOutReader = new OutputReader(process.getInputStream(), maxBuffer);
              OutputReader stdErrReader = new OutputReader(process.getErrorStream(), maxBuffer);
  
              Thread t1 = new Thread(stdOutReader);
              t1.start();
              Thread t2 = new Thread(stdErrReader);
              t2.start();
              int code = process.waitFor();
              t1.join();
              t2.join();
  
              String out = stdOutReader.getOutput();
              String err = stdErrReader.getOutput();
  
              return new Response(out, err, code);
          } catch (InterruptedException ie) {
              Thread.currentThread().interrupt();
              throw  new RuntimeException("Interrupted");
          }catch(IOException e){
              throw new RuntimeException(e);
          }
      }
docs: Executes an external command and provides results of execution.
  Will accumulate limited output from the external process.
  
  @param command array containing the command to call and its arguments.
  @param maxBuffer max size of buffers <code>out, err</code>. An external process may produce a
  lot of output, be careful setting to a large value. The buffer will not be allocated to this
  this size at the start, but will grow until it reaches it. The program will continue toi execute, and the buffer
  will be 'tailing' the output of the external process.
  
  @return instance of {@link Response} with result of execution.