code: public static int readInt(byte[] array, int offset) {
      // First make integers to resolve signed vs. unsigned issues.
      int b0 = array[offset + 0] & 0xFF;
      int b1 = array[offset + 1] & 0xFF;
      int b2 = array[offset + 2] & 0xFF;
      int b3 = array[offset + 3] & 0xFF;
      return ((b0 << 24) + (b1 << 16) + (b2 << 8) + (b3 << 0));
    }
docs: Read an integer from the byte array at the given offset.
  
  @param array Array to read from
  @param offset Offset to read at
  @return data