- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 20 for fromByteArray (0.27 sec)
-
android/guava-tests/test/com/google/common/primitives/IntsTest.java
} public void testFromByteArray() { assertThat(Ints.fromByteArray(new byte[] {0x12, 0x13, 0x14, 0x15, 0x33})).isEqualTo(0x12131415); assertThat(Ints.fromByteArray(new byte[] {(byte) 0xFF, (byte) 0xEE, (byte) 0xDD, (byte) 0xCC})) .isEqualTo(0xFFEEDDCC); } public void testFromByteArrayFails() { try { Ints.fromByteArray(new byte[Ints.BYTES - 1]); fail();
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Feb 06 16:10:08 GMT 2024 - 28.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/StatsTest.java
byte[] statsByteArray = stats.toByteArray(); // Round trip to byte array and back assertThat(Stats.fromByteArray(statsByteArray)).isEqualTo(stats); } } public void testFromByteArray_withNullInputThrowsNullPointerException() { assertThrows(NullPointerException.class, () -> Stats.fromByteArray(null)); } public void testFromByteArray_withEmptyArrayInputThrowsIllegalArgumentException() {
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Nov 09 22:49:56 GMT 2023 - 32.1K bytes - Viewed (0) -
android/guava/src/com/google/common/math/PairedStats.java
* {@link #toByteArray}. * * <p><b>Note:</b> No guarantees are made regarding stability of the representation between * versions. */ public static PairedStats fromByteArray(byte[] byteArray) { checkNotNull(byteArray); checkArgument( byteArray.length == BYTES, "Expected PairedStats.BYTES = %s, got %s", BYTES, byteArray.length);
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) -
android/guava/src/com/google/common/primitives/Chars.java
@GwtIncompatible // doesn't work public static char fromByteArray(byte[] bytes) { checkArgument(bytes.length >= BYTES, "array too small: %s < %s", bytes.length, BYTES); 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 */
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 23.5K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/Shorts.java
@GwtIncompatible // doesn't work public static short fromByteArray(byte[] bytes) { checkArgument(bytes.length >= BYTES, "array too small: %s < %s", bytes.length, BYTES); return fromBytes(bytes[0], bytes[1]); } /** * Returns the {@code short} value whose byte representation is the given 2 bytes, in big-endian * order; equivalent to {@code Shorts.fromByteArray(new byte[] {b1, b2})}. * * @since 7.0 */
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 25.1K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/Ints.java
*/ public static int 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]); } /** * 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})}. *
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 29.7K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/Longs.java
* flexibility at little cost in readability. * * @throws IllegalArgumentException if {@code bytes} has fewer than 8 elements */ 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]); }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 28.7K bytes - Viewed (0) -
android/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: "
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) -
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: "
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) -
android/guava/src/com/google/common/math/Stats.java
* #toByteArray}. * * <p><b>Note:</b> No guarantees are made regarding stability of the representation between * versions. */ public static Stats fromByteArray(byte[] byteArray) { checkNotNull(byteArray); checkArgument( byteArray.length == BYTES, "Expected Stats.BYTES = %s remaining , got %s", BYTES, byteArray.length);
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 22K bytes - Viewed (0)