Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for ByteSource (0.07 sec)

  1. guava/src/com/google/common/io/CharSource.java

     * be an empty line at the end if the contents are terminated with a line separator.
     *
     * <p>Any {@link ByteSource} containing text encoded with a specific {@linkplain Charset character
     * encoding} may be viewed as a {@code CharSource} using {@link ByteSource#asCharSource(Charset)}.
     *
     * <p><b>Note:</b> In general, {@code CharSource} is intended to be used for "file-like" sources
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:20:11 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/MoreFilesTest.java

      public void testByteSource_size_ofDirectory() throws IOException {
        try (FileSystem fs = Jimfs.newFileSystem(Configuration.unix())) {
          Path dir = fs.getPath("dir");
          Files.createDirectory(dir);
    
          ByteSource source = MoreFiles.asByteSource(dir);
    
          assertThat(source.sizeIfKnown()).isAbsent();
    
          assertThrows(IOException.class, () -> source.size());
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 16:07:00 UTC 2024
    - 26.5K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/MoreFiles.java

       */
      public static ByteSource asByteSource(Path path, OpenOption... options) {
        return new PathByteSource(path, options);
      }
    
      @IgnoreJRERequirement // *should* be redundant with the one on MoreFiles itself
      private static final class PathByteSource extends
          ByteSource
      {
    
        private static final LinkOption[] FOLLOW_LINKS = {};
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 16:07:00 UTC 2024
    - 35K bytes
    - Viewed (0)
  4. guava/src/com/google/common/io/MoreFiles.java

       * equivalent to providing the {@link StandardOpenOption#READ READ} option.
       */
      public static ByteSource asByteSource(Path path, OpenOption... options) {
        return new PathByteSource(path, options);
      }
    
      private static final class PathByteSource extends
          ByteSource
      {
    
        private static final LinkOption[] FOLLOW_LINKS = {};
    
        private final Path 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)
  5. android/guava-tests/test/com/google/common/io/CharSourceTest.java

        CharSource concatenated = CharSource.concat(cycle);
    
        String expected = "abcdabcd";
    
        // read the first 8 chars manually, since there's no equivalent to ByteSource.slice
        // TODO(cgdecker): Add CharSource.slice?
        StringBuilder builder = new StringBuilder();
        Reader reader = concatenated.openStream(); // no need to worry about closing
        for (int i = 0; i < 8; i++) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:20:11 UTC 2024
    - 11.4K bytes
    - Viewed (0)
Back to top