/** Creates a GeoPackage from an existing file specifying database credentials. */ public GeoPackage(File file, String user, String passwd, boolean readOnly) throws IOException { this.file = file; Map params = new HashMap(); if (user != null) { params.put(GeoPkgDataStoreFactory.USER.key, user); } if (passwd != null) { params.put(GeoPkgDataStoreFactory.PASSWD.key, passwd); } if (readOnly) { params.put(GeoPkgDataStoreFactory.READ_ONLY.key, readOnly); } params.put(GeoPkgDataStoreFactory.DATABASE.key, file.getPath()); params.put(GeoPkgDataStoreFactory.DBTYPE.key, GeoPkgDataStoreFactory.DBTYPE.sample); this.connPool = new GeoPkgDataStoreFactory(writerConfig).createDataSource(params); }
/** Creates a GeoPackage from an existing file specifying database credentials. */ public GeoPackage(File file, String user, String passwd, boolean readOnly) throws IOException { this.file = file; Map params = new HashMap(); if (user != null) { params.put(GeoPkgDataStoreFactory.USER.key, user); } if (passwd != null) { params.put(GeoPkgDataStoreFactory.PASSWD.key, passwd); } if (readOnly) { params.put(GeoPkgDataStoreFactory.READ_ONLY.key, readOnly); } params.put(GeoPkgDataStoreFactory.DATABASE.key, file.getPath()); params.put(GeoPkgDataStoreFactory.DBTYPE.key, GeoPkgDataStoreFactory.DBTYPE.sample); this.connPool = new GeoPkgDataStoreFactory(writerConfig).createDataSource(params); }