ProgressVisitor copyProgress = progress.subProcess(recordCount); List<String> spatialFieldNames = SFSUtilities.getGeometryFields(resultSet); int srid = doExport(tableReference, spatialFieldNames, resultSet, recordCount, fileName, progress, encoding); String path = fileName.getAbsolutePath(); String nameWithoutExt = path.substring(0, path.lastIndexOf('.')); Statement st = connection.createStatement(); ResultSet rs = st.executeQuery(String.format("select * from %s", location.toString())); doExport(tableReference, spatialFieldNames, rs, recordCount, fileName, copyProgress, encoding); String path = fileName.getAbsolutePath(); String nameWithoutExt = path.substring(0, path.lastIndexOf('.'));