Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for toUrl (0.12 sec)

  1. guava-tests/test/com/google/common/base/EnumsTest.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()));
            }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 8.8K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/ResourcesTest.java

        assertThrows(IllegalArgumentException.class, () -> Resources.getResource(tempFile.getName()));
    
        // Now set the context loader to one that should find the resource.
        URL baseUrl = tempFile.getParentFile().toURI().toURL();
        URLClassLoader loader = new URLClassLoader(new URL[] {baseUrl});
        ClassLoader oldContextLoader = Thread.currentThread().getContextClassLoader();
        try {
          Thread.currentThread().setContextClassLoader(loader);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.8K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/io/ResourcesTest.java

        assertThrows(IllegalArgumentException.class, () -> Resources.getResource(tempFile.getName()));
    
        // Now set the context loader to one that should find the resource.
        URL baseUrl = tempFile.getParentFile().toURI().toURL();
        URLClassLoader loader = new URLClassLoader(new URL[] {baseUrl});
        ClassLoader oldContextLoader = Thread.currentThread().getContextClassLoader();
        try {
          Thread.currentThread().setContextClassLoader(loader);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.8K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/base/EnumsTest.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()));
            }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 8.8K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
Back to top