Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 167 for buffers (0.1 sec)

  1. guava/src/com/google/common/escape/Platform.java

        // requireNonNull accommodates Android's @RecentlyNullable annotation on ThreadLocal.get
        return requireNonNull(DEST_TL.get());
      }
    
      /**
       * A thread-local destination buffer to keep us from creating new buffers. The starting size is
       * 1024 characters. If we grow past this we don't put it back in the threadlocal, we just keep
       * going and grow as needed.
       */
      private static final ThreadLocal<char[]> DEST_TL =
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Dec 15 19:31:54 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  2. 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
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Jan 17 18:59:58 UTC 2024
    - 29.7K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/escape/Platform.java

        // requireNonNull accommodates Android's @RecentlyNullable annotation on ThreadLocal.get
        return requireNonNull(DEST_TL.get());
      }
    
      /**
       * A thread-local destination buffer to keep us from creating new buffers. The starting size is
       * 1024 characters. If we grow past this we don't put it back in the threadlocal, we just keep
       * going and grow as needed.
       */
      private static final ThreadLocal<char[]> DEST_TL =
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Dec 15 19:31:54 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  4. 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) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 28 20:13:02 UTC 2023
    - 9.3K bytes
    - Viewed (0)
  5. 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) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 28 20:13:02 UTC 2023
    - 9.3K bytes
    - Viewed (0)
  6. 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
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Jan 17 18:59:58 UTC 2024
    - 29.7K 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
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 17 14:35:11 UTC 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:
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Sep 29 21:34:48 UTC 2023
    - 9.9K bytes
    - Viewed (0)
  9. 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;
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 26 15:56:47 UTC 2017
    - 6.2K bytes
    - Viewed (0)
  10. 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
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 17 14:35:11 UTC 2023
    - 10.9K bytes
    - Viewed (0)
Back to top