Code example for JarEntry

Methods: getName

0
 
    private void addEntryMapping(final JarEntry jarEntry, final File jarFile, final boolean overrideExistingEntries) {
        if (overrideExistingEntries) {
            addEntryUrl(jarEntry, jarFile);
        } else { 
            if (!entryMappings.containsKey(jarEntry.getName())) {
                addEntryUrl(jarEntry, jarFile);
            } 
        } 
    } 
 
    private void addEntryUrl(final JarEntry jarEntry, final File jarFile) {
        entryMappings.put(jarEntry.getName(), getUrlOfResourceInJar(jarEntry.getName(), jarFile));
    } 
 
    private URL getUrlOfResourceInJar(final String name, final File jarFile) {
        try { 
            return new URL(new URL("jar:file:" + jarFile.getAbsolutePath() + "!/"), name, NonLockingJarHandler.getInstance());
        } 
        catch (final MalformedURLException e) {
Connect your IDE to all the code out there  Get Codota for Java