Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 37 for openStream (2.05 sec)

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

      }
    
      @Override
      public void setUp() throws IOException {
        source = factory.createSource(data);
      }
    
      public void testOpenStream() throws IOException {
        InputStream in = source.openStream();
        try {
          byte[] readBytes = ByteStreams.toByteArray(in);
          assertExpectedBytes(readBytes);
        } finally {
          in.close();
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.6K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/io/ByteSource.java

       */
      public abstract InputStream openStream() throws IOException;
    
      /**
       * Opens a new buffered {@link InputStream} for reading from this source. The returned stream is
       * not required to be a {@link BufferedInputStream} in order to allow implementations to simply
       * delegate to {@link #openStream()} when the stream returned by that method does not benefit from
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 26.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/CharSource.java

      public long copyTo(CharSink sink) throws IOException {
        checkNotNull(sink);
    
        Closer closer = Closer.create();
        try {
          Reader reader = closer.register(openStream());
          Writer writer = closer.register(sink.openStream());
          return CharStreams.copy(reader, writer);
        } catch (Throwable e) {
          throw closer.rethrow(e);
        } finally {
          closer.close();
        }
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 22.4K 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);
                    }
                    assertThat(path, is(notNullValue()));
    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. guava-tests/test/com/google/common/io/ByteSourceTester.java

      }
    
      @Override
      public void setUp() throws IOException {
        source = factory.createSource(data);
      }
    
      public void testOpenStream() throws IOException {
        InputStream in = source.openStream();
        try {
          byte[] readBytes = ByteStreams.toByteArray(in);
          assertExpectedBytes(readBytes);
        } finally {
          in.close();
        }
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.6K bytes
    - Viewed (0)
  6. 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));
                }
    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)
  7. api/maven-api-core/src/main/java/org/apache/maven/api/services/PathSource.java

            this.location = location != null ? location : path.toString();
        }
    
        @Override
        public Path getPath() {
            return path;
        }
    
        @Override
        public InputStream openStream() throws IOException {
            return Files.newInputStream(path);
        }
    
        @Override
        public String getLocation() {
            return location;
        }
    
        @Override
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu May 02 15:10:38 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  8. maven-api-impl/src/main/java/org/apache/maven/internal/impl/DefaultSuperPomProvider.java

                throw new IllegalStateException("The super POM " + resource + " was not found"
                        + ", please verify the integrity of your Maven installation");
            }
            try (InputStream is = url.openStream()) {
                String modelId = "org.apache.maven:maven-model-builder:" + version + "-"
                        + this.getClass().getPackage().getImplementationVersion() + ":super-pom";
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Fri Apr 12 10:50:18 GMT 2024
    - 3K bytes
    - Viewed (0)
  9. maven-api-impl/src/main/java/org/apache/maven/internal/impl/DefaultToolchainsBuilder.java

                return PersistedToolchains.newInstance();
            }
    
            PersistedToolchains toolchains;
    
            try {
                try {
                    InputStream is = toolchainsSource.openStream();
                    if (is == null) {
                        return PersistedToolchains.newInstance();
                    }
                    toolchains = request.getSession()
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Mon Mar 25 10:50:01 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  10. maven-core/src/main/java/org/apache/maven/internal/impl/DefaultPluginXmlFactory.java

                    try (InputStream is = Files.newInputStream(path)) {
                        return xml.read(is, request.isStrict());
                    }
                } else {
                    try (InputStream is = url.openStream()) {
                        return xml.read(is, request.isStrict());
                    }
                }
            } catch (Exception e) {
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Mon Mar 25 10:50:01 GMT 2024
    - 5K bytes
    - Viewed (0)
Back to top