geopackage-sdk/src/main/java/mil/nga/geopackage/factory/GeoPackageManagerImpl.java
@Override
    public void exportGeoPackage(String database, String name, File directory) {

        File file = new File(directory, name);

        // Add the extension if not on the name
        if (!GeoPackageValidate.hasGeoPackageExtension(file)) {
            name += "." + GeoPackageConstants.GEOPACKAGE_EXTENSION;
            file = new File(directory, name);
        }

        // Copy the geopackage database to the new file location
        File dbFile = getFile(database);
        try {
            GeoPackageIOUtils.copyFile(dbFile, file);
        } catch (IOException e) {
            throw new GeoPackageException(
                    "Failed read or write GeoPackage database '" + database
                            + "' to file: '" + file, e);
        }
    }
@Override
    public void exportGeoPackage(String database, String name, File directory) {

        File file = new File(directory, name);

        // Add the extension if not on the name
        if (!GeoPackageValidate.hasGeoPackageExtension(file)) {
            name += "." + GeoPackageConstants.GEOPACKAGE_EXTENSION;
            file = new File(directory, name);
        }

        // Copy the geopackage database to the new file location
        File dbFile = getFile(database);
        try {
            GeoPackageIOUtils.copyFile(dbFile, file);
        } catch (IOException e) {
            throw new GeoPackageException(
                    "Failed read or write GeoPackage database '" + database
                            + "' to file: '" + file, e);
        }
    }
@ Override public void exportGeoPackage ( String database , String name , File directory ) { File file = new File ( directory , name ) ; // Add the extension if not on the name if ( ! GeoPackageValidate . hasGeoPackageExtension ( file ) ) { name += "." + GeoPackageConstants . GEOPACKAGE_EXTENSION ; file = new File ( directory , name ) ; } // Copy the geopackage database to the new file location File dbFile = getFile ( database ) ; try { GeoPackageIOUtils . copyFile ( dbFile , file ) ; } catch ( IOException e ) { throw new GeoPackageException ( "Failed read or write GeoPackage database '" + database + "' to file: '" + file , e ) ; } }
{@inheritDoc}
{