Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 40 for Reset (6.77 sec)

  1. android/guava-tests/test/com/google/common/base/StopwatchTest.java

        assertEquals("9.999 \u03bcs", stopwatch.toString());
        stopwatch.reset();
        stopwatch.start();
        ticker.advance(1234567);
        assertEquals("1.235 ms", stopwatch.toString());
        stopwatch.reset();
        stopwatch.start();
        ticker.advance(5000000000L);
        assertEquals("5.000 s", stopwatch.toString());
        stopwatch.reset();
        stopwatch.start();
        ticker.advance((long) (1.5 * 60 * 1000000000L));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/CharSequenceReaderTest.java

        assertTrue(reader.markSupported());
    
        assertEquals(string, readFully(reader));
        assertFullyRead(reader);
    
        // reset and read again
        reader.reset();
        assertEquals(string, readFully(reader));
        assertFullyRead(reader);
    
        // reset, skip, mark, then read the rest
        reader.reset();
        assertEquals(5, reader.skip(5));
        reader.mark(Integer.MAX_VALUE);
        assertEquals(string.substring(5), readFully(reader));
    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)
  3. guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java

          }
        }
        out.close();
    
        // Check that source returns the right data
        assertTrue(Arrays.equals(data, source.read()));
    
        // Make sure that reset deleted the file
        out.reset();
        if (file != null) {
          assertFalse(file.exists());
        }
      }
    
    
      public void testThreshold_resetOnFinalize() throws Exception {
        testThreshold(0, 100, true, true);
    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)
  4. android/guava/src/com/google/common/io/Java8Compatibility.java

        b.limit(limit);
      }
    
      static void mark(Buffer b) {
        b.mark();
      }
    
      static void position(Buffer b, int position) {
        b.position(position);
      }
    
      static void reset(Buffer b) {
        b.reset();
      }
    
      private Java8Compatibility() {}
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/cache/CacheExpirationTest.java

        for (int i = 0; i < 10; i++) {
          assertEquals(Integer.valueOf(VALUE_PREFIX + i), cache.getUnchecked(KEY_PREFIX + i));
        }
    
        for (int i = 0; i < 10; i++) {
          loader.reset();
          assertEquals(Integer.valueOf(VALUE_PREFIX + i), cache.getUnchecked(KEY_PREFIX + i));
          assertFalse("Creator should not have been called @#" + i, loader.wasCalled());
        }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Aug 05 17:21:46 GMT 2022
    - 18.7K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/base/StopwatchTest.java

        assertEquals("9.999 \u03bcs", stopwatch.toString());
        stopwatch.reset();
        stopwatch.start();
        ticker.advance(1234567);
        assertEquals("1.235 ms", stopwatch.toString());
        stopwatch.reset();
        stopwatch.start();
        ticker.advance(5000000000L);
        assertEquals("5.000 s", stopwatch.toString());
        stopwatch.reset();
        stopwatch.start();
        ticker.advance((long) (1.5 * 60 * 1000000000L));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/io/CharSequenceReaderTest.java

        assertTrue(reader.markSupported());
    
        assertEquals(string, readFully(reader));
        assertFullyRead(reader);
    
        // reset and read again
        reader.reset();
        assertEquals(string, readFully(reader));
        assertFullyRead(reader);
    
        // reset, skip, mark, then read the rest
        reader.reset();
        assertEquals(5, reader.skip(5));
        reader.mark(Integer.MAX_VALUE);
        assertEquals(string.substring(5), readFully(reader));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.5K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/io/CountingInputStreamTest.java

        counter.mark(5);
        counter.read();
        assertEquals(11, counter.getCount());
        counter.reset();
        assertEquals(10, counter.getCount());
        assertEquals(10, counter.skip(100));
        assertEquals(20, counter.getCount());
      }
    
      public void testMarkNotSet() {
        IOException expected = assertThrows(IOException.class, () -> counter.reset());
        assertThat(expected).hasMessageThat().isEqualTo("Mark not set");
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/hash/HashingInputStream.java

      @Override
      public void mark(int readlimit) {}
    
      /**
       * reset() is not supported for HashingInputStream.
       *
       * @throws IOException this operation is not supported
       */
      @Override
      public void reset() throws IOException {
        throw new IOException("reset not supported");
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 3K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/io/FileBackedOutputStream.java

       *
       * @throws IOException if an I/O error occurred while deleting the file buffer
       */
      public synchronized void reset() throws IOException {
        try {
          close();
        } finally {
          if (memory == null) {
            memory = new MemoryOutput();
          } else {
            memory.reset();
          }
          out = memory;
          if (file != null) {
            File deleteMe = file;
            file = null;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 8.2K bytes
    - Viewed (0)
Back to top