Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for ByteOrder (0.24 sec)

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

        rng.nextBytes(bytes);
        ByteBuffer littleEndian = ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN);
        ByteBuffer bigEndian = ByteBuffer.wrap(bytes).order(ByteOrder.BIG_ENDIAN);
        assertEquals(hashFunction.hashBytes(littleEndian), hashFunction.hashBytes(bigEndian));
        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)
  2. guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

          processCalled++;
          assertEquals(ByteOrder.LITTLE_ENDIAN, bb.order());
          assertTrue(bb.remaining() >= chunkSize);
          for (int i = 0; i < chunkSize; i++) {
            out.write(bb.get());
          }
        }
    
        @Override
        protected void processRemaining(ByteBuffer bb) {
          assertFalse(remainingCalled);
          remainingCalled = true;
          assertEquals(ByteOrder.LITTLE_ENDIAN, bb.order());
    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)
  3. android/guava-tests/test/com/google/common/hash/HashTestUtils.java

        rng.nextBytes(bytes);
        ByteBuffer littleEndian = ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN);
        ByteBuffer bigEndian = ByteBuffer.wrap(bytes).order(ByteOrder.BIG_ENDIAN);
        assertEquals(hashFunction.hashBytes(littleEndian), hashFunction.hashBytes(bigEndian));
        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)
  4. android/guava/src/com/google/common/hash/Murmur3_32HashFunction.java

            putByte(bytes[off + i]);
          }
          return this;
        }
    
        @CanIgnoreReturnValue
        @Override
        public Hasher putBytes(ByteBuffer buffer) {
          ByteOrder bo = buffer.order();
          buffer.order(ByteOrder.LITTLE_ENDIAN);
          while (buffer.remaining() >= 4) {
            putInt(buffer.getInt());
          }
          while (buffer.hasRemaining()) {
            putByte(buffer.get());
          }
    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/hash/Murmur3Hash128Test.java

    import static com.google.common.hash.Hashing.murmur3_128;
    
    import com.google.common.base.Charsets;
    import com.google.common.hash.HashTestUtils.HashFn;
    import java.nio.ByteBuffer;
    import java.nio.ByteOrder;
    import junit.framework.TestCase;
    
    /** Tests for {@link Murmur3_128HashFunction}. */
    public class Murmur3Hash128Test extends TestCase {
      public void testKnownValues() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.2K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/hash/LittleEndianByteArray.java

           *
           */
          String arch = System.getProperty("os.arch");
          if ("amd64".equals(arch)) {
            theGetter =
                ByteOrder.nativeOrder().equals(ByteOrder.LITTLE_ENDIAN)
                    ? UnsafeByteArray.UNSAFE_LITTLE_ENDIAN
                    : UnsafeByteArray.UNSAFE_BIG_ENDIAN;
          }
        } catch (Throwable t) {
          // ensure we really catch *everything*
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 9.7K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/hash/Murmur3_128HashFunction.java

    package com.google.common.hash;
    
    import static com.google.common.primitives.UnsignedBytes.toInt;
    
    import com.google.errorprone.annotations.Immutable;
    import java.io.Serializable;
    import java.nio.ByteBuffer;
    import java.nio.ByteOrder;
    import javax.annotation.CheckForNull;
    
    /**
     * See MurmurHash3_x64_128 in <a href="http://smhasher.googlecode.com/svn/trunk/MurmurHash3.cpp">the
     * C++ implementation</a>.
     *
     * @author Austin Appleby
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 5.6K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/hash/AbstractNonStreamingHashFunction.java

      }
    
      @Override
      public HashCode hashInt(int input) {
        return hashBytes(ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(input).array());
      }
    
      @Override
      public HashCode hashLong(long input) {
        return hashBytes(ByteBuffer.allocate(8).order(ByteOrder.LITTLE_ENDIAN).putLong(input).array());
      }
    
      @Override
      public HashCode hashUnencodedChars(CharSequence input) {
    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)
  9. android/guava/src/com/google/common/math/PairedStats.java

    import com.google.common.annotations.J2ktIncompatible;
    import com.google.common.base.MoreObjects;
    import com.google.common.base.Objects;
    import java.io.Serializable;
    import java.nio.ByteBuffer;
    import java.nio.ByteOrder;
    import javax.annotation.CheckForNull;
    
    /**
     * An immutable value object capturing some basic statistics about a collection of paired double
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri May 12 17:02:53 GMT 2023
    - 12.6K bytes
    - Viewed (0)
  10. src/cmd/cgo/internal/test/buildid_linux.go

    			// is what we assume here.
    
    			if len(d) < 12 {
    				t.Logf("note section %d too short (%d < 12)", i, len(d))
    				continue sections
    			}
    
    			namesz := f.ByteOrder.Uint32(d)
    			descsz := f.ByteOrder.Uint32(d[4:])
    			typ := f.ByteOrder.Uint32(d[8:])
    
    			an := (namesz + 3) &^ 3
    			ad := (descsz + 3) &^ 3
    
    			if int(12+an+ad) > len(d) {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 1.7K bytes
    - Viewed (0)
Back to top