Examples of JarFileIterator


Examples of com.impetus.annovention.resource.JarFileIterator

        if (urlString.endsWith("!/")) {
          //It must be a jar file since it has the !/
            urlString = urlString.substring(4);
            urlString = urlString.substring(0, urlString.length() - 2);
            url = new URL(urlString);
            return new JarFileIterator(url.openStream(), filter);
        } else if (url.getProtocol().equals("file")) {
          String path = url.getPath();
          String newPath = path.replace((CharSequence)"%2520", " ");
          File f = new File(newPath);
            if (f.isDirectory()) {
View Full Code Here

Examples of com.impetus.annovention.resource.JarFileIterator

        if (urlString.endsWith("!/")) {
          //It must be a jar file since it has the !/
            urlString = urlString.substring(4);
            urlString = urlString.substring(0, urlString.length() - 2);
            url = new URL(urlString);
            return new JarFileIterator(url.openStream(), filter);
        } else if (url.getProtocol().equals("file")) {
          String path = url.getPath();
          String newPath = path.replace((CharSequence)"%2520", " ");
          File f = new File(newPath);
            if (f.isDirectory()) {
                return new ClassFileIterator(f, filter);
            } else {
              throw new RuntimeException("bug, how is this not a directory="+f.getAbsolutePath());
            }
        } else if (url.getProtocol().equals("vfs")) {
            URLConnection conn = new URL(urlString).openConnection();
            VirtualFile vf = (VirtualFile) conn.getContent();
            File contentsFile = vf.getPhysicalFile();
            File dir = contentsFile.getParentFile();
            String fileName = vf.getName();
            File physicalFile = new File(dir, fileName);
            if (urlString.indexOf("jar") > 0) {
                // Its a jar
                InputStream is = new FileInputStream(physicalFile);
                return new JarFileIterator(is, filter);
            } else {
                // Its a directory
                return new ClassFileIterator(physicalFile, filter);
            }
View Full Code Here

Examples of com.impetus.annovention.resource.JarFileIterator

        if (urlString.endsWith("!/")) {
          //It must be a jar file since it has the !/
            urlString = urlString.substring(4);
            urlString = urlString.substring(0, urlString.length() - 2);
            url = new URL(urlString);
            return new JarFileIterator(url.openStream(), filter);
        } else if (url.getProtocol().equals("file")) {
          String path = url.getPath();
          String newPath = path.replace((CharSequence)"%2520", " ");
          File f = new File(newPath);
            if (f.isDirectory()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.