Package org.rhq.core.util.ZipUtil

Examples of org.rhq.core.util.ZipUtil.ZipEntryVisitor


        diskUsage.setMaxDiskUsable(usableSpace);

        Map<File, File> zipFiles = this.deploymentData.getZipFilesMap();
        for (File zipFile : zipFiles.keySet()) {
            ZipUtil.walkZipFile(zipFile, new ZipEntryVisitor() {
                public boolean visit(ZipEntry entry, ZipInputStream stream) throws Exception {
                    if (!entry.isDirectory()) {
                        final long size = entry.getSize();
                        diskUsage.increaseDiskUsage(size > 0 ? size : 0);
                        diskUsage.incrementFileCount();
View Full Code Here


            if (Boolean.FALSE.equals(this.deploymentData.getZipsExploded().get(zipFile))) {
                iter.remove(); // we won't be exploding this zip, we can skip it from the analysis
            }
        }
        for (File zipFileToAnalyze : zipFilesToAnalyze) {
            ZipUtil.walkZipFile(zipFileToAnalyze, new ZipEntryVisitor() {
                @Override
                public boolean visit(ZipEntry entry, ZipInputStream stream) throws Exception {
                    String relativePath = entry.getName();
                    int firstPathSep = relativePath.indexOf('/'); // regardless of platform, zip always uses /
                    if (firstPathSep != -1) {
View Full Code Here

        try {
            ZipUtil.zipFileOrDirectory(new File("target/test-classes"), zipFile);
            assert zipFile.exists();
            assert zipFile.length() > 0;

            ZipEntryVisitor visitor = new ZipUtil.ZipEntryVisitor() {
                public boolean visit(ZipEntry entry, ZipInputStream stream) throws Exception {
                    File destFile = new File(unzipDir, entry.getName());
                    if (entry.isDirectory()) {
                        destFile.mkdirs();
                    } else {
View Full Code Here

TOP

Related Classes of org.rhq.core.util.ZipUtil.ZipEntryVisitor

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.