Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 137 for buffers (0.22 sec)

  1. android/guava/src/com/google/common/io/ReaderInputStream.java

      private static int availableCapacity(Buffer buffer) {
        return buffer.capacity() - buffer.limit();
      }
    
      /**
       * Flips the buffer output buffer so we can start reading bytes from it. If we are starting to
       * drain because there was overflow, and there aren't actually any characters to drain, then the
       * overflow must be due to a small output buffer.
       */
      private void startDraining(boolean overflow) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 9.3K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/hash/FarmHashFingerprint64Test.java

      private static long fingerprint(byte[] bytes, int length) {
        return HASH_FN.hashBytes(bytes, 0, length).asLong();
      }
    
      /**
       * Tests that the Java port of FarmHashFingerprint64 provides the same results on buffers up to
       * 800 bytes long as the C++ reference implementation.
       */
      public void testMultipleLengths() {
        int iterations = 800;
        byte[] buf = new byte[iterations * 4];
        int bufLen = 0;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Jun 26 15:56:47 GMT 2017
    - 6.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/ByteStreams.java

        int initialBufferSize = min(BUFFER_SIZE, max(128, Integer.highestOneBit(totalLen) * 2));
        // Starting with an 8k buffer, double the size of each successive buffer. Smaller buffers
        // quadruple in size until they reach 8k, to minimize the number of small reads for longer
        // streams. Buffers are retained in a deque so that there's no copying between buffers while
    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)
  4. guava-tests/test/com/google/common/hash/Fingerprint2011Test.java

      private static long fingerprint(byte[] bytes, int length) {
        return HASH_FN.hashBytes(bytes, 0, length).asLong();
      }
    
      /**
       * Tests that the Java port of Fingerprint2011 provides the same results on buffers up to 800
       * bytes long as the original implementation in C++. See http://cl/106539598
       */
      public void testMultipleLengths() {
        int iterations = 800;
        byte[] buf = new byte[iterations * 4];
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Dec 29 14:55:25 GMT 2021
    - 7.6K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/hash/FarmHashFingerprint64Test.java

      private static long fingerprint(byte[] bytes, int length) {
        return HASH_FN.hashBytes(bytes, 0, length).asLong();
      }
    
      /**
       * Tests that the Java port of FarmHashFingerprint64 provides the same results on buffers up to
       * 800 bytes long as the C++ reference implementation.
       */
      public void testMultipleLengths() {
        int iterations = 800;
        byte[] buf = new byte[iterations * 4];
        int bufLen = 0;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jul 19 14:00:24 GMT 2016
    - 6.2K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/hash/Fingerprint2011Test.java

      private static long fingerprint(byte[] bytes, int length) {
        return HASH_FN.hashBytes(bytes, 0, length).asLong();
      }
    
      /**
       * Tests that the Java port of Fingerprint2011 provides the same results on buffers up to 800
       * bytes long as the original implementation in C++. See http://cl/106539598
       */
      public void testMultipleLengths() {
        int iterations = 800;
        byte[] buf = new byte[iterations * 4];
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Dec 29 14:55:25 GMT 2021
    - 7.6K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/io/CharStreams.java

          to.append(buf);
          total += buf.remaining();
          Java8Compatibility.clear(buf);
        }
        return total;
      }
    
      // TODO(lukes): consider allowing callers to pass in a buffer to use, some callers would be able
      // to reuse buffers, others would be able to size them more appropriately than the constant
      // defaults
    
      /**
       * Copies all characters between the {@link Reader} and {@link StringBuilder} objects. Does not
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/InterruptibleTask.java

             * InterruptibleChannel and JavaLangAccess.blockedOn(Thread, Interruptible), it isn't
             * predictable what work might be done. (e.g., close a file and flush buffers to disk). To
             * protect ourselves from this, we park ourselves and tell our interrupter that we did so.
             */
            if (state == PARKED || compareAndSet(state, PARKED)) {
              // Interrupting Cow Says:
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Sep 29 21:34:48 GMT 2023
    - 9.9K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/io/ByteStreamsTest.java

        byte[] b = ByteStreams.toByteArray(in);
        assertThat(b).isEqualTo(new byte[0]);
      }
    
      public void testToByteArray_largeStream() throws IOException {
        // well, large enough to require multiple buffers
        byte[] expected = newPreFilledByteArray(10000000);
        InputStream in = new ByteArrayInputStream(expected);
        byte[] b = ByteStreams.toByteArray(in);
        assertThat(b).isEqualTo(expected);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/io/ByteStreamsTest.java

        byte[] b = ByteStreams.toByteArray(in);
        assertThat(b).isEqualTo(new byte[0]);
      }
    
      public void testToByteArray_largeStream() throws IOException {
        // well, large enough to require multiple buffers
        byte[] expected = newPreFilledByteArray(10000000);
        InputStream in = new ByteArrayInputStream(expected);
        byte[] b = ByteStreams.toByteArray(in);
        assertThat(b).isEqualTo(expected);
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (0)
Back to top