Package com.sk89q.skmcl.install

Examples of com.sk89q.skmcl.install.HttpResource


                .saveContent(manifestPath)
                .asJson(ReleaseManifest.class);

        // If the JAR does not exist, install it
        if (!jarPath.exists()) {
            installer.copyTo(new HttpResource(manifest.getJarUrl()), jarPath);
        }

        // Install all the missing libraries
        for (Library library : manifest.getLibraries()) {
            if (library.matches(environment)) {
                URL url = library.getUrl(environment);
                File file = new File(librariesDir, library.getPath(environment));

                if (!file.exists()) {
                    installer.copyTo(new HttpResource(url), file);
                }

                checkInterrupted();
            }
        }
View Full Code Here


                File file = new File(assetsDir, key);

                if (!file.exists() || !getFileETag(file).equals(hash)) {
                    logger.log(Level.INFO, "Need to get {0}", key);
                    String id = hash + file.toString();
                    installer.copyTo(new HttpResource(url).withId(id), file);
                }

                marker = item.getKey();
            }
View Full Code Here

TOP

Related Classes of com.sk89q.skmcl.install.HttpResource

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.