code: public void runCommand(String[] command, GenericHandler<BufferedReader> inputHandler, GenericHandler<BufferedReader> errorHandler) throws OSException {
          Validate.notNull(command);
  
          try {
              Process p = Runtime.getRuntime().exec(command);
              BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
              BufferedReader err = new BufferedReader(new InputStreamReader(p.getErrorStream()));
  
              if (inputHandler != null) {
                  inputHandler.handle(in);
              }
              if (errorHandler != null) {
                  errorHandler.handle(err);
              }
  
              in.close();
              p.waitFor();
              p.exitValue();
          } catch (Exception ex) {
              throw new OSException(ex.getMessage(), ex);
          }
      }
docs: Runs a command on the operating system.
  
  @param command String array of command parts. The parts are concatenated
  with spaces between the parts. The single command parts should not
  contain whitespaces.
  @param inputHandler {@link GenericHandler} to handle the process input
  stream {@link BufferedReader}.
  @param errorHandler {@link GenericHandler} to handle the process error
  output {@link BufferedReader}.
  @throws OSException