Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 44 for openStream (0.22 sec)

  1. android/guava-tests/test/com/google/common/io/TestCharSink.java

      @Override
      public boolean wasStreamClosed() {
        return byteSink.wasStreamClosed();
      }
    
      @Override
      public Writer openStream() throws IOException {
        // using TestByteSink's output stream to get option behavior, so flush to it on every write
        return new FilterWriter(new OutputStreamWriter(byteSink.openStream(), UTF_8)) {
          @Override
          public void write(int c) throws IOException {
            super.write(c);
            flush();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  2. guava/src/com/google/common/io/Resources.java

      }
    
      /** A byte source that reads from a URL using {@link URL#openStream()}. */
      private static final class UrlByteSource extends ByteSource {
    
        private final URL url;
    
        private UrlByteSource(URL url) {
          this.url = checkNotNull(url);
        }
    
        @Override
        public InputStream openStream() throws IOException {
          return url.openStream();
        }
    
        @Override
        public String toString() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  3. 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);
                    }
                    assertThat(path, is(notNullValue()));
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Sat May 10 01:32:17 UTC 2025
    - 6K bytes
    - Viewed (0)
  4. android/guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java

          @Override
          String read(ByteSource byteSource, Charset cs) throws IOException {
            StringBuilder sb = new StringBuilder();
            try (InputStreamReader reader = new InputStreamReader(byteSource.openStream(), cs)) {
              CharStreams.copy(reader, sb);
            }
            return sb.toString();
          }
        },
        // It really seems like this should be faster than TO_BYTE_ARRAY_NEW_STRING.  But it just isn't
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 5.2K 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) {
                    System.out.println(ClassUtil.concatName(packageName, shortClassName));
                }
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Sat May 10 01:32:17 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/core/io/ResourceUtil.java

        public static InputStream getResourceAsStream(final String path, final String extension) {
            assertArgumentNotEmpty("path", path);
    
            final URL url = getResource(path, extension);
            return URLUtil.openStream(url);
        }
    
        /**
         * Returns the resource as a stream from the context class loader.
         * Returns <code>null</code> if the resource is not found.
         *
         * @param path
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 14.7K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/io/TestByteSink.java

      public boolean wasStreamOpened() {
        return outputStreamOpened;
      }
    
      @Override
      public boolean wasStreamClosed() {
        return outputStreamClosed;
      }
    
      @Override
      public OutputStream openStream() throws IOException {
        outputStreamOpened = true;
        bytes.reset(); // truncate
        return new Out();
      }
    
      private final class Out extends TestOutputStream {
    
        Out() throws IOException {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 1.9K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/io/MultiReader.java

        advance();
      }
    
      /** Closes the current reader and opens the next one, if any. */
      private void advance() throws IOException {
        close();
        if (it.hasNext()) {
          current = it.next().openStream();
        }
      }
    
      @Override
      public int read(char[] cbuf, int off, int len) throws IOException {
        checkNotNull(cbuf);
        if (current == null) {
          return -1;
        }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:37:28 UTC 2025
    - 2.4K bytes
    - Viewed (0)
  9. api/maven-api-core/src/main/java/org/apache/maven/api/services/Source.java

         *
         * @return a new input stream positioned at the start of the content
         * @throws IOException if the stream cannot be created or opened
         */
        @Nonnull
        InputStream openStream() throws IOException;
    
        /**
         * Returns a human-readable description of where this source came from,
         * used primarily for error messages and debugging.
         * <p>
         * Examples of locations:
         * <ul>
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Wed Jan 29 09:46:53 UTC 2025
    - 4K bytes
    - Viewed (0)
  10. src/test/java/org/codelibs/opensearch/extension/analysis/SynonymLoader.java

                        if (file.exists()) {
                            reloadableFile = file;
                        }
                        reader = new BufferedReader(new InputStreamReader(path.toUri().toURL().openStream(), StandardCharsets.UTF_8));
                    } catch (final Exception e) {
                        throw new IllegalArgumentException("Failed to read " + filePath, e);
                    }
    
    Registered: Fri Sep 19 09:08:11 UTC 2025
    - Last Modified: Sun May 18 02:59:16 UTC 2025
    - 6.7K bytes
    - Viewed (1)
Back to top