public static int readInt(byte[] bytes, int offset) {
    return (((bytes[offset] & 0xff) << 24)
        | ((bytes[offset + 1] & 0xff) << 16)
        | ((bytes[offset + 2] & 0xff) << 8)
        | (bytes[offset + 3] & 0xff));
  }
@Test
  public void testReadInt() {
    assertEquals(-935982606, IOUtils.readInt(BYTE_ARRAY, 0));
    assertEquals(906621605, IOUtils.readInt(BYTE_ARRAY, 1));
    assertEquals(166897021, IOUtils.readInt(BYTE_ARRAY, 2));
  }