Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 28 of 28 for fromBytes (0.14 sec)

  1. guava-tests/test/com/google/common/primitives/LongsTest.java

        assertThat(
                Longs.fromBytes(
                    (byte) 0x12,
                    (byte) 0x13,
                    (byte) 0x14,
                    (byte) 0x15,
                    (byte) 0x16,
                    (byte) 0x17,
                    (byte) 0x18,
                    (byte) 0x19))
            .isEqualTo(0x1213141516171819L);
        assertThat(
                Longs.fromBytes(
                    (byte) 0xFF,
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 28.7K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/primitives/IntsTest.java

            IllegalArgumentException.class, () -> Ints.fromByteArray(new byte[Ints.BYTES - 1]));
      }
    
      public void testFromBytes() {
        assertThat(Ints.fromBytes((byte) 0x12, (byte) 0x13, (byte) 0x14, (byte) 0x15))
            .isEqualTo(0x12131415);
        assertThat(Ints.fromBytes((byte) 0xFF, (byte) 0xEE, (byte) 0xDD, (byte) 0xCC))
            .isEqualTo(0xFFEEDDCC);
      }
    
      public void testByteArrayRoundTrips() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 29.2K bytes
    - Viewed (0)
  3. guava/src/com/google/common/primitives/Chars.java

        return fromBytes(bytes[0], bytes[1]);
      }
    
      /**
       * Returns the {@code char} value whose byte representation is the given 2 bytes, in big-endian
       * order; equivalent to {@code Chars.fromByteArray(new byte[] {b1, b2})}.
       *
       * @since 7.0
       */
      @GwtIncompatible // doesn't work
      public static char fromBytes(byte b1, byte b2) {
        return (char) ((b1 << 8) | (b2 & 0xFF));
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 24.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/primitives/Ints.java

        return fromBytes(bytes[0], bytes[1], bytes[2], bytes[3]);
      }
    
      /**
       * Returns the {@code int} value whose byte representation is the given 4 bytes, in big-endian
       * order; equivalent to {@code Ints.fromByteArray(new byte[] {b1, b2, b3, b4})}.
       *
       * @since 7.0
       */
      public static int fromBytes(byte b1, byte b2, byte b3, byte b4) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 31.4K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/primitives/Longs.java

       */
      public static long fromByteArray(byte[] bytes) {
        checkArgument(bytes.length >= BYTES, "array too small: %s < %s", bytes.length, BYTES);
        return fromBytes(
            bytes[0], bytes[1], bytes[2], bytes[3], bytes[4], bytes[5], bytes[6], bytes[7]);
      }
    
      /**
       * Returns the {@code long} value whose byte representation is the given 8 bytes, in big-endian
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 29.1K bytes
    - Viewed (0)
  6. guava/src/com/google/common/net/InetAddresses.java

          return requireNonNull(ip.getHostAddress());
        }
        byte[] bytes = ip.getAddress();
        int[] hextets = new int[IPV6_PART_COUNT];
        for (int i = 0; i < hextets.length; i++) {
          hextets[i] = Ints.fromBytes((byte) 0, (byte) 0, bytes[2 * i], bytes[2 * i + 1]);
        }
        compressLongestRunOfZeroes(hextets);
    
        return hextetsToIPv6String(hextets) + scopeWithDelimiter((Inet6Address) ip);
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Feb 19 21:24:11 UTC 2025
    - 47.4K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/net/InetAddresses.java

          return requireNonNull(ip.getHostAddress());
        }
        byte[] bytes = ip.getAddress();
        int[] hextets = new int[IPV6_PART_COUNT];
        for (int i = 0; i < hextets.length; i++) {
          hextets[i] = Ints.fromBytes((byte) 0, (byte) 0, bytes[2 * i], bytes[2 * i + 1]);
        }
        compressLongestRunOfZeroes(hextets);
    
        return hextetsToIPv6String(hextets) + scopeWithDelimiter((Inet6Address) ip);
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Feb 19 21:24:11 UTC 2025
    - 47.4K bytes
    - Viewed (0)
  8. lib/fips140/v1.0.0.zip

    Cryptography. DO NOT EDIT.' --package-name edwards25519 Scalar 64 '2^252 + 27742317777372353535' mul add sub opp nonzero from_montgomery to_montgomery to_bytes from_bytes // // curve description: Scalar // // machine_wordsize = 64 (from "64") // // requested operations: mul, add, sub, opp, nonzero, from_montgomery, to_montgomery, to_bytes, from_bytes // // m = 0x100000000000000000 (from "2^252 + 27742317777372353535") // // // // NOTE: In addition to the bounds specified above each function, all // //...
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Wed Jan 29 15:10:35 UTC 2025
    - 635K bytes
    - Viewed (0)
Back to top