NumbersUtil { public static long bytesToLong(byte b[]) { return bytesToLong(b, 0); }  static long parseLong(String s, long defaultValue); static int parseInt(String s, int defaultValue); static float parseFloat(String s, float defaultValue); static long bytesToLong(byte b[]); static long bytesToLong(byte b[], int pos); static String bytesToString(byte[] data, int start, int end); static String toReadableSize(long bytes); static long parseInterval(String str, long defaultValue); static int hash(long value);  }
@Test public void bytesToLong() { assertEquals(0, NumbersUtil.bytesToLong(new byte[] {0, 0, 0, 0, 0, 0, 0, 0})); assertEquals(1, NumbersUtil.bytesToLong(new byte[] {0, 0, 0, 0, 0, 0, 0, 1})); assertEquals(257, NumbersUtil.bytesToLong(new byte[] {0, 0, 0, 0, 0, 0, 1, 1})); }