Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for ReverseBytes (0.12 sec)

  1. guava/src/com/google/common/hash/LittleEndianByteArray.java

            return Long.reverseBytes(bigEndian);
          }
    
          @Override
          public void putLongLittleEndian(byte[] array, int offset, long value) {
            // Reverse the order of the bytes before storing, since we're on big-endian hardware.
            long littleEndianValue = Long.reverseBytes(value);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  2. guava/src/com/google/common/io/LittleEndianDataOutputStream.java

       * little-endian byte order.
       *
       * @throws IOException if an I/O error occurs
       */
      @Override
      public void writeLong(long v) throws IOException {
        ((DataOutputStream) out).writeLong(Long.reverseBytes(v));
      }
    
      /**
       * Writes a {@code short} as specified by {@link DataOutputStream#writeShort(int)}, except using
       * little-endian byte order.
       *
       * @throws IOException if an I/O error occurs
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 26 12:34:49 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/hash/HashingTest.java

      }
    
      public void testHashIntReverseBytesVsHashBytesIntsToByteArray() {
        int input = 42;
        assertEquals(
            Hashing.md5().hashBytes(Ints.toByteArray(input)),
            Hashing.md5().hashInt(Integer.reverseBytes(input)));
      }
    
      public void testHashIntVsForLoop() {
        int input = 42;
        HashCode expected = Hashing.md5().hashInt(input);
    
        Hasher hasher = Hashing.md5().newHasher();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 09 17:40:09 UTC 2024
    - 26.3K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/hash/HashTestUtils.java

        }
    
        // Then hash the result array
        byte[] result = hashFunction.hash(hashes, 0);
    
        // interpreted in little-endian order.
        int verification = Integer.reverseBytes(Ints.fromByteArray(result));
    
        if (expected != verification) {
          throw new AssertionError(
              "Expected: "
                  + Integer.toHexString(expected)
                  + " got: "
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 25.5K bytes
    - Viewed (0)
Back to top