Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for files (0.12 sec)

  1. src/test/java/org/codelibs/core/zip/ZipFileUtilTest.java

                    return null;
                }
            });
            final String root = new File("/").getCanonicalPath();
            assertEquals(root + "Program Files" + File.separator + "foo.zip", ZipFileUtil.toZipFilePath(url));
        }
    
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/core/jar/JarFileUtilTest.java

            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");
            URL url = new URL("jar:" + f.toURI().toURL() + "!/foo/bar/");
            url = new URL(url, "..");
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/io/FileUtil.java

            }
        }
    
        /**
         * この抽象パス名を<code>file:</code> URLに変換します。
         *
         * @param file
         *            ファイル。{@literal null}であってはいけません
         * @return ファイルURLを表すURLオブジェクト
         */
        public static URL toURL(final File file) {
            assertArgumentNotNull("file", file);
    
            try {
                return file.toURI().toURL();
            } catch (final IOException e) {
                throw new IORuntimeException(e);
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 9K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/core/net/URLUtilTest.java

        }
    
        /**
         * @throws Exception
         */
        public void testToFile() throws Exception {
            final File file = new File("Program Files/hoge.txt");
            final URL url = file.toURI().toURL();
            assertEquals(file.getAbsoluteFile(), URLUtil.toFile(url));
            assertEquals(file.getAbsoluteFile(), URLUtil.toFile(new URL("file:Program%20Files/hoge.txt")));
        }
    
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  5. src/test/java/org/codelibs/core/io/ResourceUtilTest.java

        /**
         * @throws Exception
         */
        public void testGetBuildDir() throws Exception {
            final File file = ResourceUtil.getBuildDir(getClass());
            System.out.println(file);
            final File file2 = ResourceUtil.getBuildDir("org/codelibs/core/io");
            assertEquals(file, file2);
            final File junitJar = ResourceUtil.getBuildDir(TestCase.class);
            assertTrue(junitJar.exists());
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 4.3K bytes
    - Viewed (0)
Back to top