public void waitForDecodingToFinish(){
  while (isDecoding) {
    try {
      Thread.sleep(100);
    }
 catch (    final InterruptedException e) {
      LogWriter.writeLog("Exception: " + e.getMessage());
      isDecoding=false;
    }
  }
}

public void waitForDecodingToFinish ( ) { while ( isDecoding ) { try { Thread . sleep ( 100 ) ; } catch ( final InterruptedException e ) { LogWriter . writeLog ( "Exception: " + e . getMessage ( ) ) ; isDecoding = false ; } } }
wait for decoding to finish
