Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 53 for numbytes (0.41 sec)

  1. android/guava-tests/test/com/google/common/base/Utf8Test.java

        byte[] bytes = new byte[numBytes];
        if (lim == -1) {
          lim = 1L << (numBytes * 8);
        }
        long countRoundTripped = 0;
        for (long byteChar = start; byteChar < lim; byteChar++) {
          long tmpByteChar = byteChar;
          for (int i = 0; i < numBytes; i++) {
            bytes[bytes.length - i - 1] = (byte) tmpByteChar;
            tmpByteChar = tmpByteChar >> 8;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/base/Utf8Test.java

        byte[] bytes = new byte[numBytes];
        if (lim == -1) {
          lim = 1L << (numBytes * 8);
        }
        long countRoundTripped = 0;
        for (long byteChar = start; byteChar < lim; byteChar++) {
          long tmpByteChar = byteChar;
          for (int i = 0; i < numBytes; i++) {
            bytes[bytes.length - i - 1] = (byte) tmpByteChar;
            tmpByteChar = tmpByteChar >> 8;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/net/InetAddresses.java

        int numBytes = isIpv6 ? 16 : 4;
    
        byte[] addressBytes = address.toByteArray();
        byte[] targetCopyArray = new byte[numBytes];
    
        int srcPos = Math.max(0, addressBytes.length - numBytes);
        int copyLength = addressBytes.length - srcPos;
        int destPos = numBytes - copyLength;
    
        // Check the extra bytes in the BigInteger are all zero.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Dec 15 19:31:54 GMT 2023
    - 44K bytes
    - Viewed (1)
  4. android/guava/src/com/google/common/hash/Murmur3_32HashFunction.java

        Murmur3_32Hasher(int seed) {
          this.h1 = seed;
          this.length = 0;
          isDone = false;
        }
    
        private void update(int nBytes, long update) {
          // 1 <= nBytes <= 4
          buffer |= (update & 0xFFFFFFFFL) << shift;
          shift += nBytes * 8;
          length += nBytes;
    
          if (shift >= 32) {
            h1 = mixH1(h1, mixK1((int) buffer));
            buffer >>>= 32;
            shift -= 32;
          }
        }
    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)
  5. 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 Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.1K bytes
    - Viewed (0)
  6. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 5K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/hash/PrimitiveSink.java

      PrimitiveSink putByte(byte b);
    
      /**
       * Puts an array of bytes into this sink.
       *
       * @param bytes a byte array
       * @return this instance
       */
      @CanIgnoreReturnValue
      PrimitiveSink putBytes(byte[] bytes);
    
      /**
       * Puts a chunk of an array of bytes into this sink. {@code bytes[off]} is the first byte written,
       * {@code bytes[off + len - 1]} is the last.
       *
       * @param bytes a byte array
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 3.9K bytes
    - Viewed (0)
  8. 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 Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 25.3K bytes
    - Viewed (0)
  9. 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 Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 08 13:56:22 GMT 2021
    - 8.6K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/hash/SipHashFunctionTest.java

        assertEquals(expected, SIP_WITH_KEY.hashBytes(input).asLong());
        assertEquals(expected, SIP_WITH_KEY.newHasher().putBytes(input).hash().asLong());
        assertEquals(expected, SIP_WITHOUT_KEY.hashBytes(input).asLong());
        assertEquals(expected, SIP_WITHOUT_KEY.newHasher().putBytes(input).hash().asLong());
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Sun May 05 18:02:35 GMT 2019
    - 6.6K bytes
    - Viewed (0)
Back to top