Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for fromByteArray (0.08 sec)

  1. guava-tests/test/com/google/common/math/PairedStatsTest.java

          // Round trip to byte array and back
          assertThat(PairedStats.fromByteArray(pairedStatsByteArray)).isEqualTo(pairedStats);
        }
      }
    
      public void testFromByteArray_withNullInputThrowsNullPointerException() {
        assertThrows(NullPointerException.class, () -> PairedStats.fromByteArray(null));
      }
    
      public void testFromByteArray_withEmptyArrayInputThrowsIllegalArgumentException() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 03 21:17:33 UTC 2024
    - 14K bytes
    - Viewed (0)
  2. 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() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 23 16:45:30 UTC 2024
    - 33.3K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/primitives/CharsTest.java

        }
      }
    
      @GwtIncompatible // Chars.fromByteArray
      public void testFromByteArray() {
        assertThat(Chars.fromByteArray(new byte[] {0x23, 0x45, (byte) 0xDC})).isEqualTo('\u2345');
        assertThat(Chars.fromByteArray(new byte[] {(byte) 0xFE, (byte) 0xDC})).isEqualTo('\uFEDC');
      }
    
      @GwtIncompatible // Chars.fromByteArray
      public void testFromByteArrayFails() {
        assertThrows(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 25.6K bytes
    - Viewed (0)
  4. 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() {
        assertThrows(
            IllegalArgumentException.class, () -> Ints.fromByteArray(new byte[Ints.BYTES - 1]));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 29.1K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/primitives/LongsTest.java

            Longs.toByteArray(0xFFEEDDCCBBAA9988L));
      }
    
      public void testFromByteArray() {
        assertThat(
                Longs.fromByteArray(new byte[] {0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x33}))
            .isEqualTo(0x1213141516171819L);
        assertThat(
                Longs.fromByteArray(
                    new byte[] {
                      (byte) 0xFF, (byte) 0xEE, (byte) 0xDD, (byte) 0xCC,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 29.8K bytes
    - Viewed (0)
  6. 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
       */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Aug 27 16:47:48 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  7. 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
       */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Aug 27 16:47:48 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  8. 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
       */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Aug 27 16:47:48 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  9. 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);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri May 12 17:02:53 UTC 2023
    - 12.6K bytes
    - Viewed (0)
  10. 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
       */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Aug 27 16:47:48 UTC 2024
    - 23.9K bytes
    - Viewed (0)
Back to top