Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for toUrl (0.16 sec)

  1. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

        server.enqueue(MockResponse())
        try {
          server.url("/a").toUrl().openConnection().getInputStream()
          fail<Unit>()
        } catch (expected: IOException) {
          // Expected.
        }
        server.url("/b").toUrl().openConnection().getInputStream() // Should succeed.
      }
    
      @Test
      fun clearDispatcherQueue() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  2. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        )
        server.enqueue(MockResponse()) // The jdk's HttpUrlConnection is a bastard.
        server.enqueue(MockResponse())
        try {
          server.url("/a").toUrl().openConnection().getInputStream()
          fail<Any>()
        } catch (expected: IOException) {
        }
        server.url("/b").toUrl().openConnection().getInputStream() // Should succeed.
      }
    
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/io/SourceSinkFactories.java

        @Override
        public ByteSource createSource(byte[] bytes) throws IOException {
          super.createSource(bytes);
          return Resources.asByteSource(getFile().toURI().toURL());
        }
      }
    
      private static class UrlCharSourceFactory extends FileCharSourceFactory {
    
        @SuppressWarnings("CheckReturnValue") // only using super.createSource to create a file
        @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 12.7K bytes
    - Viewed (0)
  4. maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java

                    String id = getId(constituent);
                    logger.debug("  Included: {}", id);
                }
    
                try {
                    classRealm.addURL(file.toURI().toURL());
                } catch (MalformedURLException e) {
                    // Not going to happen
                    logger.error(e.getMessage(), e);
                }
            }
        }
    
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Wed Jan 10 12:53:42 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  5. build-logic/build-init-samples/src/main/kotlin/gradlebuild/samples/SamplesGenerator.kt

            return tasksExecuted + if (descriptor.language === Language.KOTLIN) 1 else 0
        }
    
        private
        fun Directory.template(templateFragment: String) = file("$templateFragment.template").asFile.toURI().toURL()
    Plain Text
    - Registered: Wed May 01 11:36:15 GMT 2024
    - Last Modified: Tue Feb 06 17:51:21 GMT 2024
    - 13.8K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/HttpUrlJvmTest.kt

        assertThat(uri.toHttpUrlOrNull()).isNull()
      }
    
      @Test
      fun toJavaNetUrl() {
        val httpUrl = "http://username:password@host/path?query#fragment".toHttpUrl()
        val javaNetUrl = httpUrl.toUrl()
        assertThat(javaNetUrl.toString())
          .isEqualTo("http://username:password@host/path?query#fragment")
      }
    
      @Test
      fun toUri() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  7. 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)
  8. android/guava-tests/test/com/google/common/reflect/ClassPathTest.java

         * c.g.c.io.Files.createTempDir?
         */
        File fullPath = new File(Files.createTempDir(), name);
        File jarFile = pickAnyJarFile();
        Files.copy(jarFile, fullPath);
        return fullPath.toURI().toURL();
      }
    
      private static File pickAnyJarFile() throws IOException {
        for (ClassPath.LocationInfo location :
            ClassPath.locationsFrom(ClassPathTest.class.getClassLoader())) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Apr 26 14:02:27 GMT 2024
    - 24.9K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/reflect/ClassPathTest.java

         * c.g.c.io.Files.createTempDir?
         */
        File fullPath = new File(Files.createTempDir(), name);
        File jarFile = pickAnyJarFile();
        Files.copy(jarFile, fullPath);
        return fullPath.toURI().toURL();
      }
    
      private static File pickAnyJarFile() throws IOException {
        for (ClassPath.LocationInfo location :
            ClassPath.locationsFrom(ClassPathTest.class.getClassLoader())) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Jul 10 17:06:37 GMT 2023
    - 27.7K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

      }
    
      @Test
      fun httpUrl() {
        val httpUrl: HttpUrl = "".toHttpUrl()
        val isHttps: Boolean = httpUrl.isHttps
        val url: URL = httpUrl.toUrl()
        val uri: URI = httpUrl.toUri()
        val scheme: String = httpUrl.scheme
        val encodedUsername: String = httpUrl.encodedUsername
        val username: String = httpUrl.username
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
Back to top