}
public File download(File destDir, URL source) throws InterruptedException {
File dest = new File(destDir, "couchdb.zip");
FileDownloader downloader = new FileDownloader(source, dest);
new Thread(downloader).start();
while(downloader.getStatus() == FileDownloader.DOWNLOADING ) {
if (cancel) downloader.cancel();
EventBus.publish(new LoadingMessage(-1, -1, null, (int)downloader.getProgress(), 100, "Downloading..." ));
Thread.sleep(1000);
}
return dest;
}