code: public static int bytesToInt(final byte[] arr) {
      int v = 0;
      for (int i = 0; i < 4; i++) {
        v |= (arr[i] & 0XFF) << (i * 8);
      }
      return v;
    }
docs: Returns an int extracted from a Little-Endian byte array.
  @param arr the given byte array
  @return an int extracted from a Little-Endian byte array.