Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for toUrl (0.13 sec)

  1. container-tests/src/test/java/okhttp3/containers/BasicProxyTest.kt

          assertThat(response.protocol).isEqualTo(Protocol.HTTP_1_1)
        }
      }
    
      @Test
      fun testUrlConnectionDirect() {
        testRequest {
          val url = URI(mockServer.endpoint + "/person?name=peter").toURL()
    
          val connection = url.openConnection() as HttpURLConnection
    
          assertThat(connection.inputStream.source().buffer().readUtf8()).contains("Peter the person")
        }
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. build.gradle.kts

            includes.from(project.file("Module.md"))
          }
          externalDocumentationLink {
            url.set(URI.create("https://square.github.io/okio/3.x/okio/").toURL())
            packageListUrl.set(URI.create("https://square.github.io/okio/3.x/okio/okio/package-list").toURL())
          }
        }
      }
    
      plugins.withId("com.vanniktech.maven.publish.base") {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:32:42 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  7. maven-core/src/test/java/org/apache/maven/internal/transformation/AbstractRepositoryTestCase.java

            return new RemoteRepository.Builder(
                            "repo",
                            "default",
                            getTestFile("target/test-classes/repo").toURI().toURL().toString())
                    .build();
        }
    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)
  8. 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)
  9. 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)
  10. src/main/java/org/codelibs/core/io/TraversalUtil.java

                        final URL warUrl = URLUtil.create(zipUrl, "../..");
                        final String path = warUrl.getPath();
                        zipUrl = FileUtil.toURL(new File(path.substring(0, path.length() - 1)));
                        prefix = zipUrlString.substring(warUrl.toExternalForm().length());
                        loadFromZip(zipUrl);
                    }
                }
    
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 19.5K bytes
    - Viewed (0)
Back to top