private boolean startReading ( ) throws IOException , InterruptedException { //If the reader is not ready, gives it some milliseconds while ( ! this . reader . ready ( ) ) { Thread . sleep ( this . waitPause ) ; if ( this . closed ) { return false ; } } return true ; }
Checks when we can start reading the output . Timeout if it takes too long in order to avoid hangs