code: private ResultSet integrityCheck(ResultSet resultSet) {
  		try {
  			if (resultSet.next()) {
  				String value = resultSet.getString(1);
  				if (value.equals("ok")) {
  					resultSet.close();
  					resultSet = null;
  				}
  			}
  		} catch (SQLException e) {
  			throw new GeoPackageException(
  					"Integrity check failed on database: " + getName(), e);
  		}
  		return resultSet;
  	}
docs: Check the result set returned from the integrity check to see if things
  are "ok"
  
  @param resultSet
  @return null if ok, else the open cursor