@Override public int runCommand(String command) throws IOException {
  int exitStatus;
  try {
    exitStatus=runCommand(false,Arrays.asList(command.split(" ")));
  }
 catch (  InterruptedException e) {
    throw new IllegalStateException(e);
  }
  if (exitStatus != 0) {
    throw new IllegalStateException(getErrorMessage());
  }
  return exitStatus;
}

@ Override public int runCommand ( String command ) throws IOException { int exitStatus ; try { exitStatus = runCommand ( false , Arrays . asList ( command . split ( " " ) ) ) ; } catch ( InterruptedException e ) { throw new IllegalStateException ( e ) ; } if ( exitStatus != 0 ) { throw new IllegalStateException ( getErrorMessage ( ) ) ; } return exitStatus ; }
runs command and returns exit status .
