- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 26 for toUrl (0.25 sec)
-
src/test/java/org/codelibs/core/jar/JarFileUtilTest.java
/** * @throws Exception */ public void testToJarFilePath() throws Exception { final File f = new File("/Program Files/foo.jar"); 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
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) -
src/test/java/org/codelibs/core/io/ResourceTraversalTest.java
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) { System.out.println(path);
Java - Registered: Fri May 03 20:58:11 GMT 2024 - Last Modified: Thu Mar 07 01:59:08 GMT 2024 - 6K bytes - Viewed (0) -
src/test/java/org/codelibs/core/io/ResourceUtilTest.java
final URL url = new File("/Program File").toURI().toURL(); assertEquals("file:" + getRoot() + "Program File", ResourceUtil.toExternalForm(url)); } /** * @throws Exception */ public void testGetFileName() throws Exception { URL url = new File("/Program File").toURI().toURL(); assertEquals(getRoot() + "Program File", ResourceUtil.getFileName(url));
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) -
android/guava-tests/test/com/google/common/util/concurrent/ClassPathUtil.java
ImmutableList.Builder<URL> urls = ImmutableList.builder(); for (String entry : Splitter.on(PATH_SEPARATOR.value()).split(JAVA_CLASS_PATH.value())) { try { try { urls.add(new File(entry).toURI().toURL()); } catch (SecurityException e) { // File.toURI checks to see if the file is a directory urls.add(new URL("file", null, new File(entry).getAbsolutePath())); } } catch (MalformedURLException e) {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 13 20:26:15 GMT 2017 - 2.3K bytes - Viewed (0) -
maven-core/src/test/java/org/apache/maven/internal/transformation/AbstractRepositoryTestCase.java
Java - Registered: Sun Apr 28 03:35:10 GMT 2024 - Last Modified: Tue Apr 23 12:55:57 GMT 2024 - 3.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/ClassPathUtil.java
ImmutableList.Builder<URL> urls = ImmutableList.builder(); for (String entry : Splitter.on(PATH_SEPARATOR.value()).split(JAVA_CLASS_PATH.value())) { try { try { urls.add(new File(entry).toURI().toURL()); } catch (SecurityException e) { // File.toURI checks to see if the file is a directory urls.add(new URL("file", null, new File(entry).getAbsolutePath())); } } catch (MalformedURLException e) {
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 13 20:26:15 GMT 2017 - 2.3K bytes - Viewed (0) -
src/main/java/org/codelibs/core/io/FileUtil.java
* * @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) -
maven-builder-support/src/test/java/org/apache/maven/building/UrlSourceTest.java
assertEquals("url cannot be null", e.getMessage()); } @Test void testGetInputStream() throws Exception { URL txtFile = new File("target/test-classes/source.txt").toURI().toURL(); UrlSource source = new UrlSource(txtFile); try (InputStream is = source.getInputStream(); Scanner scanner = new Scanner(is)) { assertEquals("Hello World!", scanner.nextLine());
Java - Registered: Sun May 05 03:35:11 GMT 2024 - Last Modified: Sat Apr 15 17:24:20 GMT 2023 - 2K bytes - Viewed (0) -
src/test/java/org/codelibs/core/io/ClassTraversalTest.java
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) {
Java - Registered: Fri May 03 20:58:11 GMT 2024 - Last Modified: Thu Mar 07 01:59:08 GMT 2024 - 5.1K bytes - Viewed (0) -
maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java
myClasspathEntry = myClasspathEntry.substring("file:".length()); } URL docResource; try { docResource = new File(myClasspathEntry).toURL(); } catch (MalformedURLException e) { throw new ExpressionDocumentationException( "Cannot construct expression documentation classpath" + " resource base.", e); }
Java - Registered: Sun May 05 03:35:11 GMT 2024 - Last Modified: Wed Sep 06 11:28:54 GMT 2023 - 5.2K bytes - Viewed (0)