public void flush(){
  updateQueue();
  while (getQueueSize() > 0) {
    updateQueue();
    try {
      Thread.sleep(10);
    }
 catch (    InterruptedException e) {
      throw new RuntimeException(e);
    }
  }
}

public void flush ( ) { updateQueue ( ) ; while ( getQueueSize ( ) > 0 ) { updateQueue ( ) ; try { Thread . sleep ( 10 ) ; } catch ( InterruptedException e ) { throw new RuntimeException ( e ) ; } } }
wait for all the files to be sent to host system .
