Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 50 for putByte (0.21 sec)

  1. android/guava/src/com/google/common/hash/AbstractHasher.java

      }
    
      @Override
      @CanIgnoreReturnValue
      public Hasher putShort(short s) {
        putByte((byte) s);
        putByte((byte) (s >>> 8));
        return this;
      }
    
      @Override
      @CanIgnoreReturnValue
      public Hasher putInt(int i) {
        putByte((byte) i);
        putByte((byte) (i >>> 8));
        putByte((byte) (i >>> 16));
        putByte((byte) (i >>> 24));
        return this;
      }
    
      @Override
      @CanIgnoreReturnValue
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 3.5K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/hash/FarmHashFingerprint64Test.java

        final long hashCode = hasher.hash().asLong();
    
        hasher = HASH_FN.newHasher();
        hasher
            .putByte((byte) 0x01)
            .putByte((byte) 0x01)
            .putByte((byte) 0x00)
            .putByte((byte) 0x01)
            .putByte((byte) 0x00)
            .putByte((byte) 0x00)
            .putByte((byte) 0x00)
            .putByte((byte) 0x00);
        assertEquals(hashCode, hasher.hash().asLong());
    
        hasher = HASH_FN.newHasher();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jun 26 15:56:47 GMT 2017
    - 6.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/hash/Hasher.java

     * following three expressions all generate colliding hash codes:
     *
     * <pre>{@code
     * newHasher().putByte(b1).putByte(b2).putByte(b3).hash()
     * newHasher().putByte(b1).putBytes(new byte[] { b2, b3 }).hash()
     * newHasher().putBytes(new byte[] { b1, b2, b3 }).hash()
     * }</pre>
     *
     * <p>If you wish to avoid this, you should either prepend or append the size of each chunk. Keep in
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 5.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/hash/FarmHashFingerprint64Test.java

        final long hashCode = hasher.hash().asLong();
    
        hasher = HASH_FN.newHasher();
        hasher
            .putByte((byte) 0x01)
            .putByte((byte) 0x01)
            .putByte((byte) 0x00)
            .putByte((byte) 0x01)
            .putByte((byte) 0x00)
            .putByte((byte) 0x00)
            .putByte((byte) 0x00)
            .putByte((byte) 0x00);
        assertEquals(hashCode, hasher.hash().asLong());
    
        hasher = HASH_FN.newHasher();
    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)
  5. android/guava-tests/test/com/google/common/hash/Fingerprint2011Test.java

        hasher = HASH_FN.newHasher();
        hasher
            .putByte((byte) 0x01)
            .putByte((byte) 0x01)
            .putByte((byte) 0x00)
            .putByte((byte) 0x01)
            .putByte((byte) 0x00)
            .putByte((byte) 0x00)
            .putByte((byte) 0x00)
            .putByte((byte) 0x00);
        assertEquals(hashCode, hasher.hash().asLong());
    
        hasher = HASH_FN.newHasher();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 29 14:55:25 GMT 2021
    - 7.6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java

        TestHasher hasher = new TestHasher(); // byte order insignificant here
        byte[] expected = {1, 2, 3, 4, 5, 6, 7, 8};
        hasher.putByte((byte) 1);
        hasher.putBytes(new byte[] {2, 3, 4, 5, 6});
        hasher.putByte((byte) 7);
        hasher.putBytes(new byte[] {});
        hasher.putBytes(new byte[] {8});
        hasher.assertBytes(expected);
      }
    
      public void testShort() {
        TestHasher hasher = new TestHasher();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/hash/Fingerprint2011Test.java

        hasher = HASH_FN.newHasher();
        hasher
            .putByte((byte) 0x01)
            .putByte((byte) 0x01)
            .putByte((byte) 0x00)
            .putByte((byte) 0x01)
            .putByte((byte) 0x00)
            .putByte((byte) 0x00)
            .putByte((byte) 0x00)
            .putByte((byte) 0x00);
        assertEquals(hashCode, hasher.hash().asLong());
    
        hasher = HASH_FN.newHasher();
    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)
  8. android/guava/src/com/google/common/hash/Murmur3_32HashFunction.java

            buffer >>>= 32;
            shift -= 32;
          }
        }
    
        @CanIgnoreReturnValue
        @Override
        public Hasher putByte(byte b) {
          update(1, b & 0xFF);
          return this;
        }
    
        @CanIgnoreReturnValue
        @Override
        public Hasher putBytes(byte[] bytes, int off, int len) {
          checkPositionIndexes(off, off + len, bytes.length);
          int i;
          for (i = 0; i + 4 <= len; i += 4) {
    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)
  9. guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

      public void testBytes() {
        Sink sink = new Sink(4); // byte order insignificant here
        byte[] expected = {1, 2, 3, 4, 5, 6, 7, 8};
        sink.putByte((byte) 1);
        sink.putBytes(new byte[] {2, 3, 4, 5, 6});
        sink.putByte((byte) 7);
        sink.putBytes(new byte[] {});
        sink.putBytes(new byte[] {8});
        HashCode unused = sink.hash();
        sink.assertInvariants(8);
        sink.assertBytes(expected);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/hash/HashingOutputStreamTest.java

        verify(hasher).putByte((byte) b);
        verifyNoMoreInteractions(hashFunction, hasher);
      }
    
      public void testWrite_putByteArray() throws Exception {
        byte[] buf = new byte[] {'y', 'a', 'm', 's'};
        HashingOutputStream out = new HashingOutputStream(hashFunction, buffer);
        out.write(buf);
    
        verify(hashFunction).newHasher();
        verify(hasher).putBytes(buf, 0, buf.length);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 3.1K bytes
    - Viewed (0)
Back to top