Close the GeoPackage

@param geoPackage
GeoPackage
@since 3.1.0
8476
public void close(T geoPackage) {
		if (geoPackage != null) {
			try {
				geoPackage.close();
			} catch (Exception e) {
				logger.log(Level.SEVERE, "Error closing GeoPackage: "
						+ geoPackage.getName(), e);
				if (!closeQuietly) {
					throw e;
				}
			}
		}
	}
356363
public void close() throws IOException {
        if(r != null) {
            r = null;
            ogg.close();
            ogg = null;
        }
        if(w != null) {
            w.bufferPacket(info.write(), true);
            w.bufferPacket(tags.write(), false);

            long lastGranule = 0;
            for(SpeexAudioData vd : writtenPackets) {
                // Update the granule position as we go
                if(vd.getGranulePosition() >= 0 &&
                        lastGranule != vd.getGranulePosition()) {
                    w.flush();
                    lastGranule = vd.getGranulePosition();
                    w.setGranulePosition(lastGranule);
                }

                // Write the data, flushing if needed
                w.bufferPacket(vd.write());
                if(w.getSizePendingFlush() > 16384) {
                    w.flush();
                }
            }

            w.close();
            w = null;
            ogg.close();
            ogg = null;
        }
    }
723694
@Override
  public void close() throws IOException {
    LOG.info(getTask()+" done; removing files.");
    mapOutputFile.removeAll(getTask().getTaskID());
  }
1172575
public void removeSamePackage (String pkg)
    {
        Iterator<String> i = _imports.iterator();
        while (i.hasNext()) {
            String name = i.next();
            if (name.startsWith(pkg) &&
                name.indexOf('.', pkg.length() + 1) == -1) {
                    i.remove();
            }
        }
    }
84410
@Override
	public synchronized void close() throws IOException {
		// cancel synchronization
		try {
			if (syncTask != null) {
				syncTask.cancel();
			}
			sync();
			unmapFile();
		} finally {
			super.close();
		}
	}
275761
@Override
    public void close() throws IOException {
        debug(String.format("close jar provider loader for: %s", pluginJar));
        synchronized (this) {
            closed = true;
        }
        if (null != cachedJar) {
            cachedJar.close();
            classCache.clear();
            cachedJar = null;
        }
    }
796380
private static void delete(GeoPackageCore geoPackage) {

		ExtensionsDao extensionsDao = geoPackage.getExtensionsDao();

		try {
			if (extensionsDao.isTableExists()) {
				geoPackage.dropTable(extensionsDao.getTableName());
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete all extensions. GeoPackage: "
							+ geoPackage.getName(), e);
		}

	}
57635
public static void deleteFeatureStyleExtension(GeoPackageCore geoPackage) {

		FeatureCoreStyleExtension featureStyleExtension = getFeatureStyleExtension(geoPackage);
		if (featureStyleExtension.has()) {
			featureStyleExtension.removeExtension();
		}

	}
1014789
public static void deleteGeometryIndex(GeoPackageCore geoPackage,
			String table) {

		TableIndexDao tableIndexDao = geoPackage.getTableIndexDao();
		ExtensionsDao extensionsDao = geoPackage.getExtensionsDao();

		try {
			if (tableIndexDao.isTableExists()) {
				tableIndexDao.deleteByIdCascade(table);
			}
			if (extensionsDao.isTableExists()) {
				extensionsDao.deleteByExtension(
						FeatureTableCoreIndex.EXTENSION_NAME, table);
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete Table Index. GeoPackage: "
							+ geoPackage.getName() + ", Table: " + table, e);
		}
	}
887392
public boolean closeGeoPackage(String name) {
		T geoPackage = removeGeoPackage(name);
		if (geoPackage != null) {
			geoPackage.close();
		}
		return geoPackage != null;
	}
147224
@Override
    public void closeMappingFiles() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "closeMappingFiles", mapFileInputStreams);
        }
        // go through each mapping input stream and close the file.
        for (InputStream inputStream : mapFileInputStreams) {
            try {
                inputStream.close();
            } catch (Throwable t) {
                FFDCFilter.processException(t, CLASS_NAME + ".closeMappingFiles", "573");
                // log the close failed in a debug and keep going.
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Closing InputStream failed " + inputStream);
                }
            }
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "closeMappingFiles", mapFileInputStreams);
        }
    }
154803
function stopPackageFromJob(job) {
   if (!isUndefined(job.document.packageName)) {
      stopPackage(job.document.packageName, function(err) {
         if (isUndefined(err)) {
            job.succeeded({ operation: job.operation, state: 'package stopped' }, showJobsError);
         } else {
            job.failed({ operation: job.operation, errorCode: 'ERR_UNABLE_TO_STOP_PACKAGE', errorMessage: errorToString(err) }, showJobsError);
         }
      });
   } else {
      job.failed({ operation: job.operation, errorCode: 'ERR_UNNAMED_PACKAGE', errorMessage: 'no packageName property specified' }, showJobsError);
   }
}
629310
@Override
    public void close() {
        if (trainingArchive != null && trainingArchive != weightsArchive) {
            trainingArchive.close();
            trainingArchive = null;
        }
        if (weightsArchive != null) {
            weightsArchive.close();
            weightsArchive = null;
        }
    }
275787
public static void deleteFeatureTileLink(GeoPackageCore geoPackage,
			String table) {

		FeatureTileLinkDao featureTileLinkDao = geoPackage
				.getFeatureTileLinkDao();
		try {
			if (featureTileLinkDao.isTableExists()) {
				featureTileLinkDao.deleteByTableName(table);
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete Feature Tile Link. GeoPackage: "
							+ geoPackage.getName() + ", Table: " + table, e);
		}
	}
1107429
public static void deleteGeometryIndexExtension(GeoPackageCore geoPackage) {

		GeometryIndexDao geometryIndexDao = geoPackage.getGeometryIndexDao();
		TableIndexDao tableIndexDao = geoPackage.getTableIndexDao();
		ExtensionsDao extensionsDao = geoPackage.getExtensionsDao();

		try {
			if (geometryIndexDao.isTableExists()) {
				geoPackage.dropTable(geometryIndexDao.getTableName());
			}
			if (tableIndexDao.isTableExists()) {
				geoPackage.dropTable(tableIndexDao.getTableName());
			}
			if (extensionsDao.isTableExists()) {
				extensionsDao
						.deleteByExtension(FeatureTableCoreIndex.EXTENSION_NAME);
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete Table Index extension and tables. GeoPackage: "
							+ geoPackage.getName(), e);
		}

	}
80610
private static void delete(GeoPackageCore geoPackage, String table) {

		ExtensionsDao extensionsDao = geoPackage.getExtensionsDao();

		try {
			if (extensionsDao.isTableExists()) {
				extensionsDao.deleteByTableName(table);
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete Table extensions. GeoPackage: "
							+ geoPackage.getName() + ", Table: " + table, e);
		}
	}
1292821
@Override
	public void close() {
		if (leaf != null) {
			leaf.close();
			leaf = null;
		}
		dirsMayBeUpdated = null;
	}