code: public static GeoPackage open(String name, File file) {
  
  		// Validate or add the file extension
  		if (GeoPackageIOUtils.hasFileExtension(file)) {
  			GeoPackageValidate.validateGeoPackageExtension(file);
  		} else {
  			file = GeoPackageIOUtils.addFileExtension(file,
  					GeoPackageConstants.GEOPACKAGE_EXTENSION);
  		}
  
  		// Create the GeoPackage Connection and table creator
  		GeoPackageConnection connection = connect(file);
  		GeoPackageTableCreator tableCreator = new GeoPackageTableCreator(
  				connection);
  
  		// Create a GeoPackage
  		GeoPackage geoPackage = new GeoPackageImpl(name, file, connection,
  				tableCreator);
  
  		// Validate the GeoPackage has the minimum required tables
  		try {
  			GeoPackageValidate.validateMinimumTables(geoPackage);
  		} catch (RuntimeException e) {
  			geoPackage.close();
  			throw e;
  		}
  
  		return geoPackage;
  	}
docs: Open a GeoPackage
  
  @param name
  GeoPackage name
  @param file
  GeoPackage file
  @return GeoPackage
  @since 3.0.2