Package org.jdesktop.wonderland.common.checksums

Examples of org.jdesktop.wonderland.common.checksums.Checksum


            logger.warning("Unable to locate checksum information for " +
                    assetURI.toExternalForm());
            return null;
        }

        Checksum checksum = moduleChecksums.getChecksumMap().get(path);
        if (checksum == null) {
            logger.warning("Unable to locate checksum for path " + path +
                    " for " + assetURI.toExternalForm());
            return null;
        }
        return checksum.getChecksum();
    }
View Full Code Here


    public static ChecksumList generate(File root, File file, String algorithm) throws NoSuchAlgorithmException {
        // Generate the checksum for the file, but put it in the list and
        // return
        try {
            MessageDigest digest = MessageDigest.getInstance(algorithm);
            Checksum checksum = computeChecksum(root, file, digest);
            ChecksumList checksumList = new ChecksumList();
            checksumList.putChecksum(checksum);
            return checksumList;
        } catch (java.io.IOException excp) {
            logger.log(Level.WARNING, "Unable to generate checksum for " +
View Full Code Here

                 * If a normal, non-hidden file, then check whether the name
                 * is included or excluded.
                 */
                if (ChecksumUtils.isAcceptable(file.getName(), includes, excludes) == true) {
                    try {
                        Checksum checksum = computeChecksum(root, file, digest);
                        list.put(checksum.getPathName(), checksum);
                    } catch (java.io.IOException excp) {
                        // Log an error, but continue
                        logger.log(Level.WARNING, "Failed to generate checksum" +
                                " for " + file.getAbsolutePath(), excp);
                    }
View Full Code Here

        if (File.separatorChar != '/') {
            name = name.replace(File.separatorChar, '/');
        }

        /* Create a new checksum object and add to the list */
        Checksum c = new Checksum();
        c.setLastModified(file.lastModified());
        c.setPathName(name);
        c.setChecksum(Checksum.toHexString(byteChecksum));
        return c;
    }
View Full Code Here

                    continue;
                }

                for (Map.Entry<String, Checksum> e : checksumList.getChecksumMap().entrySet()) {
                    String assetName = e.getKey();
                    Checksum assetChecksum = e.getValue();

                    try {
                        URL assetURL = getAssetURL(builder, moduleName, assetName);
                        out.put(assetName,
                                new RunnerChecksum(assetChecksum,
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.common.checksums.Checksum

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.