Code example for JarURLConnection

Methods: getJarFile

0
                        url = new URL("jar" + urlStr.substring(idx));
                    } 
                } 
 
                JarURLConnection conn = (JarURLConnection)url.openConnection();
                jarFile = conn.getJarFile();
            } 
            catch (Exception e) {
                if (DEBUG) System.err.println("icurb jar error: " + e);
                throw new IllegalArgumentException("jar error: " + e.getMessage());
            } 
        } 
         
        public void guide(URLVisitor v, boolean recurse, boolean strip) {
            try { 
                Enumeration<JarEntry> entries = jarFile.entries();
                 
                while (entries.hasMoreElements()) {
                    JarEntry entry = entries.nextElement();
                     
                    if (!entry.isDirectory()) { // skip just directory paths