Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 260 for Read (0.14 sec)

  1. guava/src/com/google/common/collect/ImmutableMapValues.java

      @J2ktIncompatible // serialization
      @GwtIncompatible // serialization
      Object writeReplace() {
        return super.writeReplace();
      }
    
      // No longer used for new writes, but kept so that old data can still be read.
      @GwtIncompatible // serialization
      @J2ktIncompatible
      @SuppressWarnings("unused")
      private static class SerializedForm<V> implements Serializable {
        final ImmutableMap<?, V> map;
    
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Nov 30 21:54:06 GMT 2023
    - 3.6K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/io/ByteSourceTest.java

        // The stream reports no bytes... importantly, it doesn't read the byte at index 5 when it
        // should be reading the byte at index 10.
        // We could use a custom InputStream instead to make the read start at index 10, but since this
        // is a racy situation anyway, this behavior seems reasonable.
        assertEquals(-1, in.read());
      }
    
      private static class AppendableByteSource extends ByteSource {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.9K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/io/CharSourceTester.java

      public void testOpenStream() throws IOException {
        Reader reader = source.openStream();
    
        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();
    
        assertExpectedString(writer.toString());
      }
    
      public void testOpenBufferedStream() throws IOException {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 6.8K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/MultiInputStream.java

      }
    
      @Override
      public int read() throws IOException {
        while (in != null) {
          int result = in.read();
          if (result != -1) {
            return result;
          }
          advance();
        }
        return -1;
      }
    
      @Override
      public int read(byte[] b, int off, int len) throws IOException {
        checkNotNull(b);
        while (in != null) {
          int result = in.read(b, off, len);
          if (result != -1) {
    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)
  5. guava-tests/test/com/google/common/io/BaseEncodingTest.java

        try (InputStream decodingStream = encoding.decodingStream(new StringReader(encoded))) {
          for (int i = 0; i < bytes.length; i++) {
            assertThat(decodingStream.read()).isEqualTo(bytes[i] & 0xFF);
          }
          assertThat(decodingStream.read()).isEqualTo(-1);
        }
      }
    
      public void testToString() {
        assertThat(base64().toString()).isEqualTo("BaseEncoding.base64().withPadChar('=')");
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Aug 25 16:34:08 GMT 2022
    - 24.6K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/io/Resources.java

      }
    
      /**
       * Reads all bytes from a URL into a byte array.
       *
       * @param url the URL to read from
       * @return a byte array containing all the bytes from the URL
       * @throws IOException if an I/O error occurs
       */
      public static byte[] toByteArray(URL url) throws IOException {
        return asByteSource(url).read();
      }
    
      /**
       * Reads all characters from a URL into a {@link String}, using the given character set.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 7.4K bytes
    - Viewed (0)
  7. guava/src/com/google/common/cache/LocalCache.java

        public void clear() {
          ReferenceEntry<K, V> e = head.getNextInWriteQueue();
          while (e != head) {
            ReferenceEntry<K, V> next = e.getNextInWriteQueue();
            nullifyWriteOrder(e);
            e = next;
          }
    
          head.setNextInWriteQueue(head);
          head.setPreviousInWriteQueue(head);
        }
    
        @Override
        public Iterator<ReferenceEntry<K, V>> iterator() {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 150.3K bytes
    - Viewed (0)
  8. guava-testlib/test/com/google/common/testing/FakeTickerTest.java

        assertEquals(0, ticker.read());
        assertEquals(10, ticker.read());
        assertEquals(20, ticker.read());
      }
    
      public void testAutoIncrementStep_millis() {
        FakeTicker ticker = new FakeTicker().setAutoIncrementStep(1, TimeUnit.MILLISECONDS);
        assertEquals(0, ticker.read());
        assertEquals(1000000, ticker.read());
        assertEquals(2000000, ticker.read());
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 14:40:46 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/ByteStreams.java

          int off = (int) expectedSize - remaining;
          int read = in.read(bytes, off, remaining);
          if (read == -1) {
            // end of stream before reading expectedSize bytes
            // just return the bytes read so far
            return Arrays.copyOf(bytes, off);
          }
          remaining -= read;
        }
    
        // bytes is now full
        int b = in.read();
        if (b == -1) {
          return bytes;
        }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jan 17 18:59:58 GMT 2024
    - 29.7K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/io/MultiReader.java

          current = it.next().openStream();
        }
      }
    
      @Override
      public int read(char[] cbuf, int off, int len) throws IOException {
        checkNotNull(cbuf);
        if (current == null) {
          return -1;
        }
        int result = current.read(cbuf, off, len);
        if (result == -1) {
          advance();
          return read(cbuf, off, len);
        }
        return result;
      }
    
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 2.4K bytes
    - Viewed (2)
Back to top