Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 81 for numbytes (0.19 sec)

  1. android/guava-tests/test/com/google/common/math/MathBenchmarking.java

        BigInteger result = randomPositiveBigInteger(numBits);
        return RANDOM_SOURCE.nextBoolean() ? result : result.negate();
      }
    
      /**
       * Chooses a number in (-2^numBits, 2^numBits) at random, with density concentrated in numbers of
       * lower magnitude.
       */
      static BigInteger randomBigInteger(int numBits) {
        while (true) {
          if (RANDOM_SOURCE.nextBoolean()) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.1K bytes
    - Viewed (0)
  2. 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)
  3. android/guava/src/com/google/common/hash/AbstractCompositeHashFunction.java

            return this;
          }
    
          @Override
          public Hasher putBytes(byte[] bytes) {
            for (Hasher hasher : hashers) {
              hasher.putBytes(bytes);
            }
            return this;
          }
    
          @Override
          public Hasher putBytes(byte[] bytes, int off, int len) {
            for (Hasher hasher : hashers) {
              hasher.putBytes(bytes, off, len);
            }
            return this;
          }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Oct 06 00:47:57 GMT 2021
    - 5.4K bytes
    - Viewed (0)
  4. 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)
  5. android/guava-tests/test/com/google/common/hash/HashTestUtils.java

        ByteBuffer bigEndian = ByteBuffer.wrap(bytes).order(ByteOrder.BIG_ENDIAN);
        assertEquals(
            hashFunction.newHasher().putBytes(littleEndian).hash(),
            hashFunction.newHasher().putBytes(bigEndian).hash());
        assertEquals(ByteOrder.LITTLE_ENDIAN, littleEndian.order());
        assertEquals(ByteOrder.BIG_ENDIAN, bigEndian.order());
      }
    
    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)
  6. android/guava/src/com/google/common/hash/AbstractHashFunction.java

      public HashCode hashBytes(byte[] input, int off, int len) {
        checkPositionIndexes(off, off + len, input.length);
        return newHasher(len).putBytes(input, off, len).hash();
      }
    
      @Override
      public HashCode hashBytes(ByteBuffer input) {
        return newHasher(input.remaining()).putBytes(input).hash();
      }
    
      @Override
      public Hasher newHasher(int expectedInputSize) {
        checkArgument(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 2.5K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

        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);
      }
    
      public void testShort() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/hash/Murmur3Hash32Test.java

        assertHash(expected, murmur3_32_fixed().hashBytes(string.getBytes(charset)));
        assertHash(expected, murmur3_32().newHasher().putBytes(string.getBytes(charset)).hash());
        assertHash(expected, murmur3_32_fixed().newHasher().putBytes(string.getBytes(charset)).hash());
      }
    
      private boolean allBmp(String string) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 08 13:56:22 GMT 2021
    - 8.6K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/hash/AbstractNonStreamingHashFunction.java

        @Override
        public Hasher putByte(byte b) {
          stream.write(b);
          return this;
        }
    
        @Override
        public Hasher putBytes(byte[] bytes, int off, int len) {
          stream.write(bytes, off, len);
          return this;
        }
    
        @Override
        public Hasher putBytes(ByteBuffer bytes) {
          stream.write(bytes);
          return this;
        }
    
        @Override
        public HashCode hash() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 3.8K bytes
    - Viewed (0)
  10. 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 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