Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 279 for Read (0.16 sec)

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

        assertTrue(source.wasStreamOpened());
        assertFalse(source.wasStreamClosed());
    
        StringWriter writer = new StringWriter();
        char[] buf = new char[64];
        int read;
        while ((read = reader.read(buf)) != -1) {
          writer.write(buf, 0, read);
        }
        reader.close();
        writer.close();
    
        assertTrue(source.wasStreamClosed());
        assertEquals(STRING, writer.toString());
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/io/LineReader.java

          // The default implementation of Reader#read(CharBuffer) allocates a
          // temporary char[], so we call Reader#read(char[], int, int) instead.
          int read = (reader != null) ? reader.read(buf, 0, buf.length) : readable.read(cbuf);
          if (read == -1) {
            lineBuf.finish();
            break;
          }
          lineBuf.add(buf, 0, read);
        }
        return lines.poll();
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java

        ByteSource source = out.asByteSource();
    
        out.write(data);
        assertTrue(Arrays.equals(data, source.read()));
    
        out.reset();
        assertTrue(Arrays.equals(new byte[0], source.read()));
    
        out.write(data);
        assertTrue(Arrays.equals(data, source.read()));
    
        out.close();
      }
    
      private static boolean isAndroid() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/io/IoTestCase.java

        InputStream in = url.openStream();
        try {
          OutputStream out = new FileOutputStream(file);
          try {
            byte[] buf = new byte[4096];
            for (int read = in.read(buf); read != -1; read = in.read(buf)) {
              out.write(buf, 0, read);
            }
          } finally {
            out.close();
          }
        } finally {
          in.close();
        }
      }
    
      @CanIgnoreReturnValue
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/io/SourceSinkFactories.java

          InputStream in = new FileInputStream(file);
          ByteArrayOutputStream out = new ByteArrayOutputStream();
          byte[] buffer = new byte[100];
          int read;
          while ((read = in.read(buffer)) != -1) {
            out.write(buffer, 0, read);
          }
          return out.toByteArray();
        }
      }
    
      private static class FileCharSourceFactory extends FileFactory implements CharSourceFactory {
    
    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. guava-tests/test/com/google/common/io/CharSinkTest.java

     */
    
    package com.google.common.io;
    
    import static com.google.common.io.TestOption.CLOSE_THROWS;
    import static com.google.common.io.TestOption.OPEN_THROWS;
    import static com.google.common.io.TestOption.READ_THROWS;
    import static com.google.common.io.TestOption.WRITE_THROWS;
    import static org.junit.Assert.assertThrows;
    
    import com.google.common.collect.ImmutableList;
    import java.io.IOException;
    import java.io.StringReader;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.4K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/io/ByteArrayDataInput.java

     * An extension of {@code DataInput} for reading from in-memory byte arrays; its methods offer
     * identical functionality but do not throw {@link IOException}.
     *
     * <p><b>Warning:</b> The caller is responsible for not attempting to read past the end of the
     * array. If any method encounters the end of the array prematurely, it throws {@link
     * IllegalStateException} to signify <i>programmer error</i>. This behavior is a technical violation
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  8. android/guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java

        assertEquals(-1, ArbitraryInstances.get(InputStream.class).read());
        assertEquals(-1, ArbitraryInstances.get(ByteArrayInputStream.class).read());
        assertEquals(-1, ArbitraryInstances.get(Readable.class).read(CharBuffer.allocate(1)));
        assertEquals(-1, ArbitraryInstances.get(Reader.class).read());
        assertEquals(-1, ArbitraryInstances.get(StringReader.class).read());
        assertEquals(0, ArbitraryInstances.get(Buffer.class).capacity());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.7K bytes
    - Viewed (0)
  9. .github/pull_request_template.md

    <!--
    Please read the contribution guidelines at
    https://github.com/google/guava/wiki/HowToContribute#code-contributions
    and
    https://github.com/google/guava/blob/master/CONTRIBUTING.md
    before sending a pull request.
    
    We generally welcome PRs for fixing trivial bugs or typos, but please refrain
    from sending a PR with significant changes unless explicitly requested.
    Plain Text
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Oct 27 19:53:41 GMT 2023
    - 371 bytes
    - Viewed (0)
  10. guava/src/com/google/common/base/Suppliers.java

        final Supplier<T> delegate;
        transient volatile boolean initialized;
        // "value" does not need to be volatile; visibility piggy-backs
        // on volatile read of "initialized".
        @CheckForNull transient T value;
    
        MemoizingSupplier(Supplier<T> delegate) {
          this.delegate = checkNotNull(delegate);
        }
    
        @Override
        @ParametricNullness
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 15.3K bytes
    - Viewed (0)
Back to top