Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for FromBytes (0.18 sec)

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

          fail();
        } catch (IllegalArgumentException expected) {
        }
      }
    
      @GwtIncompatible // Shorts.fromBytes
      public void testFromBytes() {
        assertThat(Shorts.fromBytes((byte) 0x23, (byte) 0x45)).isEqualTo((short) 0x2345);
        assertThat(Shorts.fromBytes((byte) 0xFE, (byte) 0xDC)).isEqualTo((short) 0xFEDC);
      }
    
      @GwtIncompatible // Shorts.fromByteArray, Shorts.toByteArray
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 26.6K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/hash/LittleEndianByteArray.java

       *
       * <p>This abstraction allows us to use single-instruction load and put when available, or fall
       * back on the slower approach of using Longs.fromBytes(byte...).
       */
      private interface LittleEndianBytes {
        long getLongLittleEndian(byte[] array, int offset);
    
        void putLongLittleEndian(byte[] array, int offset, long value);
      }
    
      /**
    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)
  3. guava-tests/test/com/google/common/primitives/ShortsTest.java

          fail();
        } catch (IllegalArgumentException expected) {
        }
      }
    
      @GwtIncompatible // Shorts.fromBytes
      public void testFromBytes() {
        assertThat(Shorts.fromBytes((byte) 0x23, (byte) 0x45)).isEqualTo((short) 0x2345);
        assertThat(Shorts.fromBytes((byte) 0xFE, (byte) 0xDC)).isEqualTo((short) 0xFEDC);
      }
    
      @GwtIncompatible // Shorts.fromByteArray, Shorts.toByteArray
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 26.6K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/primitives/CharsTest.java

          fail();
        } catch (IllegalArgumentException expected) {
        }
      }
    
      @GwtIncompatible // Chars.fromBytes
      public void testFromBytes() {
        assertThat(Chars.fromBytes((byte) 0x23, (byte) 0x45)).isEqualTo('\u2345');
        assertThat(Chars.fromBytes((byte) 0xFE, (byte) 0xDC)).isEqualTo('\uFEDC');
      }
    
      @GwtIncompatible // Chars.fromByteArray, Chars.toByteArray
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 24.7K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/primitives/CharsTest.java

          fail();
        } catch (IllegalArgumentException expected) {
        }
      }
    
      @GwtIncompatible // Chars.fromBytes
      public void testFromBytes() {
        assertThat(Chars.fromBytes((byte) 0x23, (byte) 0x45)).isEqualTo('\u2345');
        assertThat(Chars.fromBytes((byte) 0xFE, (byte) 0xDC)).isEqualTo('\uFEDC');
      }
    
      @GwtIncompatible // Chars.fromByteArray, Chars.toByteArray
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 24.7K bytes
    - Viewed (0)
  6. android/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));
    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)
  7. 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,
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 30K bytes
    - Viewed (0)
  8. android/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,
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 30K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/primitives/Shorts.java

        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
       */
      @GwtIncompatible // doesn't work
      public static short fromBytes(byte b1, byte b2) {
    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)
  10. 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
    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)
Back to top