@Test public void shouldSuccessfullyConvertBytesToLong() { final long value = 1234567891L; byte[] bytes = IEXByteTestUtil.convert(value); assertThat(IEXByteConverter.convertBytesToLong(bytes)).isEqualTo(value); }
public static long convertBytesToLong(final byte[] bytes) { return (long) (0xff & bytes[7]) << 56 | (long) (0xff & bytes[6]) << 48 | (long) (0xff & bytes[5]) << 40 | (long) (0xff & bytes[4]) << 32 | (long) (0xff & bytes[3]) << 24 | (long) (0xff & bytes[2]) << 16 | (long) (0xff & bytes[1]) << 8 | (long) (0xff & bytes[0]) << 0; }
IEXByteConverter { public static long convertBytesToLong(final byte[] bytes) { return (long) (0xff & bytes[7]) << 56 | (long) (0xff & bytes[6]) << 48 | (long) (0xff & bytes[5]) << 40 | (long) (0xff & bytes[4]) << 32 | (long) (0xff & bytes[3]) << 24 | (long) (0xff & bytes[2]) << 16 | (long) (0xff & bytes[1]) << 8 | (long) (0xff & bytes[0]) << 0; } }
IEXByteConverter { public static long convertBytesToLong(final byte[] bytes) { return (long) (0xff & bytes[7]) << 56 | (long) (0xff & bytes[6]) << 48 | (long) (0xff & bytes[5]) << 40 | (long) (0xff & bytes[4]) << 32 | (long) (0xff & bytes[3]) << 24 | (long) (0xff & bytes[2]) << 16 | (long) (0xff & bytes[1]) << 8 | (long) (0xff & bytes[0]) << 0; } private  IEXByteConverter(); }
IEXByteConverter { public static long convertBytesToLong(final byte[] bytes) { return (long) (0xff & bytes[7]) << 56 | (long) (0xff & bytes[6]) << 48 | (long) (0xff & bytes[5]) << 40 | (long) (0xff & bytes[4]) << 32 | (long) (0xff & bytes[3]) << 24 | (long) (0xff & bytes[2]) << 16 | (long) (0xff & bytes[1]) << 8 | (long) (0xff & bytes[0]) << 0; } private  IEXByteConverter(); static long convertBytesToLong(final byte[] bytes); static int convertBytesToInt(final byte[] bytes); static int convertBytesToUnsignedShort(final byte[] bytes); static short convertBytesToShort(final byte[] bytes); static String convertBytesToString(final byte[] bytes); static IEXPrice convertBytesToIEXPrice(final byte[] bytes); }
IEXByteConverter { public static long convertBytesToLong(final byte[] bytes) { return (long) (0xff & bytes[7]) << 56 | (long) (0xff & bytes[6]) << 48 | (long) (0xff & bytes[5]) << 40 | (long) (0xff & bytes[4]) << 32 | (long) (0xff & bytes[3]) << 24 | (long) (0xff & bytes[2]) << 16 | (long) (0xff & bytes[1]) << 8 | (long) (0xff & bytes[0]) << 0; } private  IEXByteConverter(); static long convertBytesToLong(final byte[] bytes); static int convertBytesToInt(final byte[] bytes); static int convertBytesToUnsignedShort(final byte[] bytes); static short convertBytesToShort(final byte[] bytes); static String convertBytesToString(final byte[] bytes); static IEXPrice convertBytesToIEXPrice(final byte[] bytes);  }