Code example for JarEntry

Methods: isDirectory

0
                // file:/tmp/a_ear/lib/pu.jar, 
                // but containers (e.g.) WebLogic return this kind of URL, 
                // so we better handle this in our code to improve pluggability. 
                // Read the entire jar file. 
                result = new JarFileArchive(rootUrl, conn.getJarFile(), descriptorLocation);
            } else if (je.isDirectory()) {
                // e.g. jar:file:/tmp/a_ear/b.war!/WEB-INF/classes/ 
                // entryName [je.getName()] is a directory 
                result = new DirectoryInsideJarURLArchive(rootUrl, descriptorLocation);
            } else { 
                // some URL (e.g.) jar:file:/tmp/a_ear/b.war!/WEB-INF/lib/pu.jar 
                // entryName [je.getName()] is a file, so treat this URL as a 
                // URL from which  a JAR format InputStream can be obtained. 
                result = new JarInputStreamURLArchive(rootUrl, descriptorLocation);
            } 
        } else if (isJarInputStream(rootUrl)){
            result = new JarInputStreamURLArchive(rootUrl, descriptorLocation);
        } else { 
            result = new URLArchive(rootUrl, descriptorLocation);
        }