Package java.util.zip

Examples of java.util.zip.ZipException


    {
        CBJarResource resourceFile = getJarContainingResource(imageName);
        if (resourceFile != null)
            return resourceFile.getImage(imageName, imageCreator);

        throw new ZipException("Image File: '" + imageName + "' not found");
    }
View Full Code Here


        if (resourceFile != null)
        {
            log.finer("  $$ found resource '" + resourceName + "' in zip file '" + resourceFile.getZipFileName() + "' - extracting");
            return resourceFile.getResource(resourceName);
        }
        throw new ZipException("File: '" + resourceName + "' not found");

    }
View Full Code Here

        CBJarResource resourceFile = getJarContainingResource(resourceName);
        if (resourceFile != null)
        {
            return resourceFile.getLastModified();
        }
        throw new ZipException("File: '" + resourceName + "' not found");

    }
View Full Code Here

    {
        CBJarResource resourceFile = getJarContainingResource(resourceName);
        if (resourceFile != null)
            return resourceFile.getInputStream(resourceName);

        throw new ZipException("File: '" + resourceName + "' not found");
    }
View Full Code Here

    {
        CBJarResource resourceFile = getJarContainingResource(imageName);
        if (resourceFile != null)
            return resourceFile.getImage(imageName, imageCreator);

        throw new ZipException("Image File: '" + imageName + "' not found");
    }
View Full Code Here

    {
        CBJarResource resourceFile = getJarContainingResource(resourceName);
        if (resourceFile != null)
            return resourceFile.getResource(resourceName);

        throw new ZipException("File: '" + resourceName + "' not found");

    }
View Full Code Here

        }
        if (!sawEntry)
            // When we try to open a file that is NOT a ZIP file, the loop
            // above may exit immediately without throwing an IOException.
            // check for that case and throw one ourselves.
            throw new ZipException("Not a valid ZIP file: " + srcZip);
    }
View Full Code Here

        }
        catch( ZipException e )
        {
            // since the current ZipException gives no indication what jar file is corrupted
            // we prefer to wrap another ZipException for better error visibility
            ZipException ze = new ZipException( "Cannot process Jar entry on URL: " + url + " due to " + e.getMessage() );
            ze.initCause( e );
            throw ze;
        }

        return visitor.getClasses();
    }
View Full Code Here

        }
        catch( ZipException e )
        {
            // since the current ZipException gives no indication what jar file is corrupted
            // we prefer to wrap another ZipException for better error visibility
            ZipException ze = new ZipException( "Cannot process Jar entry on URL: " + url + " due to " + e.getMessage() );
            ze.initCause( e );
            throw ze;
        }

        return visitor.getClasses();
    }
View Full Code Here

    /** {@inheritDoc} */
    public void parseFromLocalFileData(byte[] buffer, int offset, int length)
        throws ZipException {

        if (length < 5) {
            throw new ZipException("UniCode path extra data must have at least"
                                   + " 5 bytes.");
        }

        int version = buffer[offset];

        if (version != 0x01) {
            throw new ZipException("Unsupported version [" + version
                                   + "] for UniCode path extra data.");
        }

        nameCRC32 = ZipLong.getValue(buffer, offset + 1);
        unicodeName = new byte[length - 5];
View Full Code Here

TOP

Related Classes of java.util.zip.ZipException

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.