Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for toJarFilePath (0.06 sec)

  1. src/test/java/org/codelibs/core/io/ResourceTraversalTest.java

            final String classFilePath = TestCase.class.getName().replace('.', '/') + ".class";
            final URL classURL = ResourceUtil.getResource(classFilePath);
            final URL jarURL = new File(JarFileUtil.toJarFilePath(classURL)).toURI().toURL();
            ResourceTraversalUtil.forEach(new ZipInputStream(jarURL.openStream()), (ResourceHandler) (path, is) -> {
                try {
                    if (count < 10) {
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Sat May 10 01:32:17 UTC 2025
    - 6K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/core/io/ClassTraversalTest.java

            final String classFilePath = TestCase.class.getName().replace('.', '/') + ".class";
            final URL classURL = ResourceUtil.getResource(classFilePath);
            final URL jarURL = new File(JarFileUtil.toJarFilePath(classURL)).toURI().toURL();
            ClassTraversalUtil.forEach(new ZipInputStream(jarURL.openStream()), (ClassHandler) (packageName, shortClassName) -> {
                if (count < 10) {
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Sat May 10 01:32:17 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/jar/JarFileUtil.java

            }
            return create(new File(toJarFilePath(jarUrl)));
        }
    
        /**
         * Returns the path of the JAR file specified by the URL.
         *
         * @param jarUrl the URL of the JAR file (must not be {@literal null})
         * @return the path of the JAR file specified by the URL
         */
        public static String toJarFilePath(final URL jarUrl) {
            assertArgumentNotNull("jarUrl", jarUrl);
    
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/core/jar/JarFileUtilTest.java

            final URL url = new URL("jar:" + f.toURI().toURL() + "!/");
            final String root = new File("/").getCanonicalPath();
            assertEquals(root + "Program Files" + File.separator + "foo.jar", JarFileUtil.toJarFilePath(url));
        }
    
        /**
         * @throws Exception
         */
        public void testRelativePath() throws Exception {
            final File f = new File("/Program Files/foo.jar");
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Sat May 10 01:32:17 UTC 2025
    - 1.5K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/core/io/ResourceUtil.java

                dir = new File(getFileName(url));
                for (int i = 0; i < num; ++i) {
                    dir = dir.getParentFile();
                }
            } else {
                dir = new File(JarFileUtil.toJarFilePath(url));
            }
            return dir;
        }
    
        /**
         * Converts the resource URL to an external form.
         *
         * @param url
         *            The resource URL. Must not be {@literal null}.
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 14.7K bytes
    - Viewed (0)
Back to top