Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for hasRemaining (0.23 sec)

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

        requireNonNull(seq); // safe because of checkOpen
        return hasRemaining() ? seq.charAt(pos++) : -1;
      }
    
      @Override
      public synchronized int read(char[] cbuf, int off, int len) throws IOException {
        checkPositionIndexes(off, off + len, cbuf.length);
        checkOpen();
        requireNonNull(seq); // safe because of checkOpen
        if (!hasRemaining()) {
          return -1;
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  2. guava/src/com/google/common/io/CharSequenceReader.java

        requireNonNull(seq); // safe because of checkOpen
        return hasRemaining() ? seq.charAt(pos++) : -1;
      }
    
      @Override
      public synchronized int read(char[] cbuf, int off, int len) throws IOException {
        checkPositionIndexes(off, off + len, cbuf.length);
        checkOpen();
        requireNonNull(seq); // safe because of checkOpen
        if (!hasRemaining()) {
          return -1;
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/hash/AbstractNonStreamingHashFunctionTest.java

            }
    
            @Override
            protected void process(ByteBuffer bb) {
              while (bb.hasRemaining()) {
                out.write(bb.get());
              }
            }
    
            @Override
            protected void processRemaining(ByteBuffer bb) {
              while (bb.hasRemaining()) {
                out.write(bb.get());
              }
            }
          };
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 4.4K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/hash/FunnelsTest.java

              protected HashCode makeHash() {
                throw new UnsupportedOperationException();
              }
    
              @Override
              protected void process(ByteBuffer bb) {
                while (bb.hasRemaining()) {
                  bb.get();
                }
              }
            };
        try {
          funnel.funnel(null, primitiveSink);
          fail();
        } catch (NullPointerException ok) {
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/hash/SipHashFunction.java

          b += CHUNK_SIZE;
          processM(buffer.getLong());
        }
    
        @Override
        protected void processRemaining(ByteBuffer buffer) {
          b += buffer.remaining();
          for (int i = 0; buffer.hasRemaining(); i += 8) {
            finalM ^= (buffer.get() & 0xFFL) << i;
          }
        }
    
        @Override
        protected HashCode makeHash() {
          // End with a byte encoding the positive integer b mod 256.
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Apr 20 18:43:59 UTC 2021
    - 5.3K bytes
    - Viewed (0)
  6. 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);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Aug 02 13:50:22 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  7. guava/src/com/google/common/hash/SipHashFunction.java

          b += CHUNK_SIZE;
          processM(buffer.getLong());
        }
    
        @Override
        protected void processRemaining(ByteBuffer buffer) {
          b += buffer.remaining();
          for (int i = 0; buffer.hasRemaining(); i += 8) {
            finalM ^= (buffer.get() & 0xFFL) << i;
          }
        }
    
        @Override
        protected HashCode makeHash() {
          // End with a byte encoding the positive integer b mod 256.
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Apr 20 18:43:59 UTC 2021
    - 5.3K bytes
    - Viewed (0)
  8. 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) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Apr 20 18:43:59 UTC 2021
    - 21.3K bytes
    - Viewed (0)
  9. 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);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  10. 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. */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 29.7K bytes
    - Viewed (0)
Back to top