Package com.github.couchapptakeout.events.utils

Examples of com.github.couchapptakeout.events.utils.FileDownloader


    }

    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;
    }
View Full Code Here

TOP

Related Classes of com.github.couchapptakeout.events.utils.FileDownloader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.