Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for hasRemaining (0.22 sec)

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

          return position - oldPosition;
        }
    
        ByteBuffer buf = ByteBuffer.wrap(createBuffer());
        long total = 0;
        while (from.read(buf) != -1) {
          Java8Compatibility.flip(buf);
          while (buf.hasRemaining()) {
            total += to.write(buf);
          }
          Java8Compatibility.clear(buf);
        }
        return total;
      }
    
      /** Max array length on JVM. */
    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)
  2. android/guava-tests/test/com/google/common/hash/HashTestUtils.java

        byte[] bytes = new byte[rng.nextInt(256) + 1];
        rng.nextBytes(bytes);
        ByteBuffer buffer = ByteBuffer.wrap(bytes);
        HashCode unused = hashFunction.hashBytes(buffer);
        assertFalse(buffer.hasRemaining());
      }
    
      static void assertHashByteBufferPreservesByteOrder(HashFunction hashFunction) {
        Random rng = new Random(0L);
        byte[] bytes = new byte[rng.nextInt(256) + 1];
        rng.nextBytes(bytes);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 25.3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/hash/Murmur3_32HashFunction.java

          ByteOrder bo = buffer.order();
          buffer.order(ByteOrder.LITTLE_ENDIAN);
          while (buffer.remaining() >= 4) {
            putInt(buffer.getInt());
          }
          while (buffer.hasRemaining()) {
            putByte(buffer.get());
          }
          buffer.order(bo);
          return this;
        }
    
        @CanIgnoreReturnValue
        @Override
        public Hasher putInt(int i) {
          update(4, i);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 11.9K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/hash/Crc32cHashFunction.java

          if (finished) {
            return;
          }
          crc0 = combine(0, crc0);
          crc0 = combine(crc0, crc1);
          crc0 = combine(crc0, crc2);
          crc0 = combine(crc0, crc3);
          while (bb.hasRemaining()) {
            crc0 = (crc0 >>> 8) ^ BYTE_TABLE[(bb.get() ^ crc0) & 0xFF];
          }
          finished = true;
        }
    
        @Override
        protected HashCode makeHash() {
          if (!finished) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 21.3K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/hash/HashTestUtils.java

        byte[] bytes = new byte[rng.nextInt(256) + 1];
        rng.nextBytes(bytes);
        ByteBuffer buffer = ByteBuffer.wrap(bytes);
        HashCode unused = hashFunction.hashBytes(buffer);
        assertFalse(buffer.hasRemaining());
      }
    
      static void assertHashByteBufferPreservesByteOrder(HashFunction hashFunction) {
        Random rng = new Random(0L);
        byte[] bytes = new byte[rng.nextInt(256) + 1];
        rng.nextBytes(bytes);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 25.3K bytes
    - Viewed (0)
Back to top