@Test
public void testByteArrayToInt() {

    assertEquals(0, ByteUtil.byteArrayToInt(null));
    assertEquals(0, ByteUtil.byteArrayToInt(new byte[0]));
    byte[] x = new byte[] { 5,1,7,0,8 };
    long start = System.currentTimeMillis();
    for (int i = 0; i < 100000000; i++) {
         ByteArray.read32bit(x, 0);
    }
    long end = System.currentTimeMillis();
    System.out.println(end - start + "ms");
    long start1 = System.currentTimeMillis();
    for (int i = 0; i < 100000000; i++) {
        new BigInteger(1, x).intValue();
    }
    long end1 = System.currentTimeMillis();
    System.out.println(end1 - start1 + "ms");
}