Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 53 for numbytes (3.28 sec)

  1. android/guava-tests/test/com/google/common/hash/Murmur3Hash128Test.java

        HashCode expected = toHashCode(expected1, expected2);
        byte[] input = HashTestUtils.ascii(stringInput);
        assertEquals(expected, murmur3_128(seed).hashBytes(input));
        assertEquals(expected, murmur3_128(seed).newHasher().putBytes(input).hash());
      }
    
      /** Returns a {@link HashCode} for a sequence of longs, in big-endian order. */
      private static HashCode toHashCode(long... longs) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.2K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/hash/HashingInputStream.java

       */
      @Override
      @CanIgnoreReturnValue
      public int read(byte[] bytes, int off, int len) throws IOException {
        int numOfBytesRead = in.read(bytes, off, len);
        if (numOfBytesRead != -1) {
          hasher.putBytes(bytes, off, numOfBytesRead);
        }
        return numOfBytesRead;
      }
    
      /**
       * mark() is not supported for HashingInputStream
       *
       * @return {@code false} always
       */
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 3K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/hash/HashStringBenchmark.java

        for (int i = 0; i < reps; i++) {
          res +=
              System.identityHashCode(
                  hashFunctionEnum
                      .getHashFunction()
                      .newHasher()
                      .putBytes(strings[i & SAMPLE_MASK].getBytes(StandardCharsets.UTF_8))
                      .hash());
        }
        return res;
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 5.3K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/hash/Fingerprint2011Test.java

            .putChar((char) 0x0100)
            .putChar((char) 0x0000)
            .putChar((char) 0x0000);
        assertEquals(hashCode, hasher.hash().asLong());
    
        hasher = HASH_FN.newHasher();
        hasher.putBytes(new byte[] {0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00});
        assertEquals(hashCode, hasher.hash().asLong());
    
        hasher = HASH_FN.newHasher();
        hasher.putLong(0x0000000001000101L);
    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/FunnelsTest.java

        byte[] bytes = {1, 2, 3, 4};
        out.write(255);
        out.write(bytes);
        out.write(bytes, 1, 2);
        verify(sink).putByte((byte) 255);
        verify(sink).putBytes(bytes);
        verify(sink).putBytes(bytes, 1, 2);
      }
    
      public void testSerialization() {
        assertSame(
            Funnels.byteArrayFunnel(), SerializableTester.reserialize(Funnels.byteArrayFunnel()));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 5.9K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/hash/HashingInputStreamTest.java

        int numOfByteRead = in.read(buf, 0, buf.length);
        assertEquals(4, numOfByteRead);
        for (int i = 0; i < testBytes.length; i++) {
          assertEquals(testBytes[i], buf[i]);
        }
    
        verify(hasher).putBytes(testBytes, 0, testBytes.length);
        verify(hashFunction).newHasher();
        verifyNoMoreInteractions(hashFunction, hasher);
      }
    
      public void testRead_putByteArrayAtPos() throws Exception {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 5K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/hash/Funnels.java

        @Override
        public void write(int b) {
          sink.putByte((byte) b);
        }
    
        @Override
        public void write(byte[] bytes) {
          sink.putBytes(bytes);
        }
    
        @Override
        public void write(byte[] bytes, int off, int len) {
          sink.putBytes(bytes, off, len);
        }
    
        @Override
        public String toString() {
          return "Funnels.asOutputStream(" + sink + ")";
        }
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 25 20:32:46 GMT 2022
    - 7.3K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/hash/HashingOutputStreamTest.java

        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);
        verifyNoMoreInteractions(hashFunction, hasher);
      }
    
      public void testWrite_putByteArrayAtPos() throws Exception {
        byte[] buf = new byte[] {'y', 'a', 'm', 's'};
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 3.1K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/io/ByteSourceTest.java

        @Override
        public InputStream openStream() {
          return new In();
        }
    
        public void append(byte[] b) {
          byte[] newBytes = Arrays.copyOf(bytes, bytes.length + b.length);
          System.arraycopy(b, 0, newBytes, bytes.length, b.length);
          bytes = newBytes;
        }
    
        private class In extends InputStream {
          private int pos;
    
          @Override
          public int read() throws IOException {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.9K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/hash/FarmHashFingerprint64Test.java

            .putChar((char) 0x0100)
            .putChar((char) 0x0000)
            .putChar((char) 0x0000);
        assertEquals(hashCode, hasher.hash().asLong());
    
        hasher = HASH_FN.newHasher();
        hasher.putBytes(new byte[] {0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00});
        assertEquals(hashCode, hasher.hash().asLong());
    
        hasher = HASH_FN.newHasher();
        hasher.putLong(0x0000000001000101L);
    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)
Back to top