Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 61 for openStream (0.08 sec)

  1. src/main/java/org/codelibs/core/net/URLUtil.java

        /**
         * URLをオープンして{@link InputStream}を返します。
         *
         * @param url
         *            URL。{@literal null}であってはいけません
         * @return URLが表すリソースを読み込むための{@link InputStream}
         */
        public static InputStream openStream(final URL url) {
            assertArgumentNotNull("url", url);
    
            try {
                final URLConnection connection = url.openConnection();
                connection.setUseCaches(false);
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  2. guava/src/com/google/common/io/Files.java

          ByteSource
      {
    
        private final File file;
    
        private FileByteSource(File file) {
          this.file = checkNotNull(file);
        }
    
        @Override
        public FileInputStream openStream() throws IOException {
          return new FileInputStream(file);
        }
    
        @Override
        public Optional<Long> sizeIfKnown() {
          if (file.isFile()) {
            return Optional.of(file.length());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Jul 22 19:03:12 UTC 2024
    - 33.1K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/io/FileUtil.java

            final URL url = ResourceUtil.getResource(path);
            if (url.getProtocol().equals("file")) {
                return readText(URLUtil.toFile(url), encoding);
            }
            final InputStream is = URLUtil.openStream(url);
            try {
                final Reader reader = ReaderUtil.create(new BufferedInputStream(is, DEFAULT_BUF_SIZE), encoding);
                return read(reader, DEFAULT_BUF_SIZE);
            } finally {
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 9K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/core/io/PropertiesUtil.java

         */
        public static void load(final Properties props, final URL url) {
            assertArgumentNotNull("props", props);
            assertArgumentNotNull("url", url);
    
            final InputStream in = URLUtil.openStream(url);
    
            try {
                props.load(in);
            } catch (final IOException e) {
                throw new IORuntimeException(e);
            } finally {
                CloseableUtil.close(in);
            }
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  5. compat/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java

            }
    
            if (pluginFile.isFile()) {
                try {
                    return new URL("jar:" + pluginFile.toURI() + "!/" + descriptor).openStream();
                } catch (MalformedURLException e) {
                    throw new IllegalStateException(e);
                }
            } else {
                return Files.newInputStream(new File(pluginFile, descriptor).toPath());
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

        }
      }
    
      private static final class NullByteSink extends ByteSink implements Serializable {
        private static final NullByteSink INSTANCE = new NullByteSink();
    
        @Override
        public OutputStream openStream() {
          return ByteStreams.nullOutputStream();
        }
      }
    
      // Compare by toString() to satisfy 2 properties:
      // 1. compareTo(null) should throw NullPointerException
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

        }
      }
    
      private static final class NullByteSink extends ByteSink implements Serializable {
        private static final NullByteSink INSTANCE = new NullByteSink();
    
        @Override
        public OutputStream openStream() {
          return ByteStreams.nullOutputStream();
        }
      }
    
      // Compare by toString() to satisfy 2 properties:
      // 1. compareTo(null) should throw NullPointerException
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/io/MoreFiles.java

          for (OpenOption option : options) {
            if (option == NOFOLLOW_LINKS) {
              return false;
            }
          }
          return true;
        }
    
        @Override
        public InputStream openStream() throws IOException {
          return Files.newInputStream(path, options);
        }
    
        private BasicFileAttributes readAttributes() throws IOException {
          return Files.readAttributes(
              path,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 16:07:00 UTC 2024
    - 35K bytes
    - Viewed (0)
  9. guava/src/com/google/common/io/MoreFiles.java

          for (OpenOption option : options) {
            if (option == NOFOLLOW_LINKS) {
              return false;
            }
          }
          return true;
        }
    
        @Override
        public InputStream openStream() throws IOException {
          return Files.newInputStream(path, options);
        }
    
        private BasicFileAttributes readAttributes() throws IOException {
          return Files.readAttributes(
              path,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 16:07:00 UTC 2024
    - 34.5K bytes
    - Viewed (0)
  10. compat/maven-embedder/src/main/java/org/apache/maven/cli/props/MavenProperties.java

            try (InputStream is = Files.newInputStream(location)) {
                load(is);
            }
        }
    
        public void load(URL location) throws IOException {
            try (InputStream is = location.openStream()) {
                load(is);
            }
        }
    
        public void load(InputStream is) throws IOException {
            load(new InputStreamReader(is, DEFAULT_ENCODING));
        }
    
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 38.2K bytes
    - Viewed (0)
Back to top