Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 220 for Read (0.19 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/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)
  5. 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)
  6. .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)
  7. 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)
  8. android/guava-tests/test/com/google/common/io/CharSequenceReaderTest.java

        assertEquals(-1, reader.read());
        assertEquals(-1, reader.read(new char[10], 0, 10));
        assertEquals(-1, reader.read(CharBuffer.allocate(10)));
        assertEquals(0, reader.skip(10));
      }
    
      private static String readFully(CharSequenceReader reader) throws IOException {
        StringBuilder builder = new StringBuilder();
        int read;
        while ((read = reader.read()) != -1) {
          builder.append((char) read);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.5K bytes
    - Viewed (0)
  9. 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 Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/ArrayListMultimap.java

     * implement {@link java.util.RandomAccess}.
     *
     * <p>This class is not threadsafe when any concurrent operations update the multimap. Concurrent
     * read operations will work correctly. To allow concurrent update operations, wrap your multimap
     * with a call to {@link Multimaps#synchronizedListMultimap}.
     *
     * <p>See the Guava User Guide article on <a href=
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 6.9K bytes
    - Viewed (0)
Back to top