public synchronized void waitForEnd ( ) throws ServerException , ClientException , IOException { try { while ( ! isDone ( ) && ! hasError ( ) ) { wait ( ) ; } } catch ( InterruptedException e ) { // break } checkError ( ) ; }
Blocks until the transfer is complete or the transfer fails .