@Test public void testNetworkByteOrderToInt() { byte[] bytes = new byte[] {0, 0, 1, 1}; int num = ByteUtil.networkByteOrderToInt(bytes); Assert.assertEquals(257, num); System.out.println(String.format("[CRAFT-ATOM-UTIL] (^_^) <%s> Case -> make network byte order to int. ", CaseCounter.incr(1))); }
public static int networkByteOrderToInt(byte[] buf) { return networkByteOrderToInt(buf, 0, buf.length); }
ByteUtil { public static int networkByteOrderToInt(byte[] buf) { return networkByteOrderToInt(buf, 0, buf.length); } }
ByteUtil { public static int networkByteOrderToInt(byte[] buf) { return networkByteOrderToInt(buf, 0, buf.length); } private  ByteUtil(); }
ByteUtil { public static int networkByteOrderToInt(byte[] buf) { return networkByteOrderToInt(buf, 0, buf.length); } private  ByteUtil(); static int indexOf(final byte[] source, final byte[] target); static int indexOf(final byte[] source, final byte[] target, int fromIndex); static int indexOf(final byte[] source, final byte[] target, int fromIndex, int endIndex); static int indexOf(byte[] source, byte target); static int indexOf(byte[] source, byte target, int fromIndex); static int indexOf(byte[] source, byte target, int fromIndex, int endIndex); static byte[] split(byte[] bytes, int start, int end); static byte[] reverse(byte[] src); static String asHex(byte[] bytes); static String asHex(byte[] bytes, String separator); static byte[] intToNetworkByteOrder(int num, int count); static int networkByteOrderToInt(byte[] buf); static int networkByteOrderToInt(byte[] buf, int start, int count); static boolean isEmpty(byte[] bytes); static final short bytes2short(byte[] b); static final short bytes2short(byte[] b, int off); static final byte[] short2bytes(short s); static void short2bytes(short s, byte[] b, int off); static final int bytes2int(byte[] b); static final int bytes2int(byte[] b, int off); static final byte[] int2bytes(int i); static void int2bytes(int i, byte[] b, int off); static final long bytes2long(byte[] b); static final long bytes2long(byte[] b, int off); static final byte[] long2bytes(long l); static void long2bytes(long l, byte[] b, int off); static float bytes2float(byte[] b); static float bytes2float(byte[] b, int off); static final byte[] float2bytes(float f); static void float2bytes(float f, byte[] b, int off); static double bytes2double(byte[] b); static double bytes2double(byte[] b, int off); static final byte[] double2bytes(double d); static void double2bytes(double d, byte[] b, int off); static final int makeIntFromByte2(byte[] b); static final int makeIntFromByte2(byte[] b, int off); static final int makeIntFromByte4(byte[] b); static final int makeIntFromByte4(byte[] b, int off); }
ByteUtil { public static int networkByteOrderToInt(byte[] buf) { return networkByteOrderToInt(buf, 0, buf.length); } private  ByteUtil(); static int indexOf(final byte[] source, final byte[] target); static int indexOf(final byte[] source, final byte[] target, int fromIndex); static int indexOf(final byte[] source, final byte[] target, int fromIndex, int endIndex); static int indexOf(byte[] source, byte target); static int indexOf(byte[] source, byte target, int fromIndex); static int indexOf(byte[] source, byte target, int fromIndex, int endIndex); static byte[] split(byte[] bytes, int start, int end); static byte[] reverse(byte[] src); static String asHex(byte[] bytes); static String asHex(byte[] bytes, String separator); static byte[] intToNetworkByteOrder(int num, int count); static int networkByteOrderToInt(byte[] buf); static int networkByteOrderToInt(byte[] buf, int start, int count); static boolean isEmpty(byte[] bytes); static final short bytes2short(byte[] b); static final short bytes2short(byte[] b, int off); static final byte[] short2bytes(short s); static void short2bytes(short s, byte[] b, int off); static final int bytes2int(byte[] b); static final int bytes2int(byte[] b, int off); static final byte[] int2bytes(int i); static void int2bytes(int i, byte[] b, int off); static final long bytes2long(byte[] b); static final long bytes2long(byte[] b, int off); static final byte[] long2bytes(long l); static void long2bytes(long l, byte[] b, int off); static float bytes2float(byte[] b); static float bytes2float(byte[] b, int off); static final byte[] float2bytes(float f); static void float2bytes(float f, byte[] b, int off); static double bytes2double(byte[] b); static double bytes2double(byte[] b, int off); static final byte[] double2bytes(double d); static void double2bytes(double d, byte[] b, int off); static final int makeIntFromByte2(byte[] b); static final int makeIntFromByte2(byte[] b, int off); static final int makeIntFromByte4(byte[] b); static final int makeIntFromByte4(byte[] b, int off);  }