code: public static int bytesToInt(byte[] bytes, int offset) {
          return ((bytes[offset + 3] & 0xFF) << 0) + ((bytes[offset + 2] & 0xFF) << 8)
                          + ((bytes[offset + 1] & 0xFF) << 16) + ((bytes[offset + 0] & 0xFF) << 24);
      }
docs: A utility method to convert the int from the byte array to an int.
  
  @param bytes
  The byte array containing the int.
  @param offset
  The index at which the int is located.
  @return The int value.