Changeset 30738 in osm for applications/editors/josm/plugins/opendata
- Timestamp:
- 2014-10-19T01:27:04+02:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/opendata
- Files:
-
- 11 edited
-
includes/org/apache/poi/hssf/record/formula/function/FunctionMetadataReader.java (modified) (8 diffs)
-
modules/fr.datagouvfr/src/org/openstreetmap/josm/plugins/opendata/modules/fr/datagouvfr/datasets/hydrologie/EauxDeSurfaceHandler.java (modified) (7 diffs)
-
src/org/geotools/data/shapefile/files/TabFiles.java (modified) (1 diff)
-
src/org/openstreetmap/josm/plugins/opendata/core/io/NeptuneReader.java (modified) (15 diffs)
-
src/org/openstreetmap/josm/plugins/opendata/core/io/archive/SevenZipReader.java (modified) (4 diffs)
-
src/org/openstreetmap/josm/plugins/opendata/core/io/archive/ZipReader.java (modified) (3 diffs)
-
src/org/openstreetmap/josm/plugins/opendata/core/io/tabular/CsvImporter.java (modified) (2 diffs)
-
src/org/openstreetmap/josm/plugins/opendata/core/modules/ModuleInformation.java (modified) (2 diffs)
-
src/org/openstreetmap/josm/plugins/opendata/core/modules/ReadRemoteModuleInformationTask.java (modified) (3 diffs)
-
src/org/openstreetmap/josm/plugins/opendata/core/util/NamesFrUtils.java (modified) (5 diffs)
-
util/opendata/ModuleListGenerator.java (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/formula/function/FunctionMetadataReader.java
r30737 r30738 22 22 import java.io.InputStream; 23 23 import java.io.InputStreamReader; 24 import java.io.UnsupportedEncodingException;25 24 import java.util.Arrays; 26 25 import java.util.HashSet; … … 32 31 /** 33 32 * Converts the text meta-data file into a <tt>FunctionMetadataRegistry</tt> 34 * 33 * 35 34 * @author Josh Micich 36 35 */ … … 38 37 39 38 private static final String METADATA_FILE_NAME = "functionMetadata.txt"; 40 39 41 40 /** plain ASCII text metadata file uses three dots for ellipsis */ 42 41 private static final String ELLIPSIS = "..."; … … 59 58 } 60 59 61 BufferedReader br;62 try {63 br = new BufferedReader(new InputStreamReader(is,"UTF-8"));64 } catch(UnsupportedEncodingException e) {65 throw new RuntimeException(e);66 }67 60 FunctionDataBuilder fdb = new FunctionDataBuilder(400); 68 61 69 try { 62 try (BufferedReader br = new BufferedReader(new InputStreamReader(is, "UTF-8"))) { 70 63 while (true) { 71 64 String line = br.readLine(); … … 82 75 processLine(fdb, line); 83 76 } 84 br.close();85 77 } catch (IOException e) { 86 78 throw new RuntimeException(e); … … 107 99 validateFunctionName(functionName); 108 100 // TODO - make POI use isVolatile 109 fdb.add(functionIndex, functionName, minParams, maxParams, 101 fdb.add(functionIndex, functionName, minParams, maxParams, 110 102 returnClassCode, parameterClassCodes, hasNote); 111 103 } 112 104 113 105 114 106 private static byte parseReturnTypeCode(String code) { … … 164 156 165 157 /** 166 * Makes sure that footnote digits from the original OOO document have not been accidentally 158 * Makes sure that footnote digits from the original OOO document have not been accidentally 167 159 * left behind 168 160 */ … … 182 174 return; 183 175 } 184 throw new RuntimeException("Invalid function name '" + functionName 176 throw new RuntimeException("Invalid function name '" + functionName 185 177 + "' (is footnote number incorrectly appended)"); 186 178 } -
applications/editors/josm/plugins/opendata/modules/fr.datagouvfr/src/org/openstreetmap/josm/plugins/opendata/modules/fr/datagouvfr/datasets/hydrologie/EauxDeSurfaceHandler.java
r30731 r30738 14 14 import java.util.regex.Pattern; 15 15 16 import org.openstreetmap.josm.Main; 16 17 import org.openstreetmap.josm.data.osm.DataSet; 17 18 import org.openstreetmap.josm.plugins.opendata.core.io.archive.DefaultArchiveHandler; … … 23 24 private static final String ZIP_PATTERN = "FR(.*)_SW"; 24 25 private static final String SHP_PATTERN = "FR_(.*)_SWB_.W_20......"; 25 26 26 27 private static final class WaterAgency { 27 28 public final String code; … … 34 35 } 35 36 } 36 37 37 38 private static final WaterAgency[] waterAgencies = new WaterAgency[]{ 38 39 new WaterAgency("A", "Escaut Somme", "Escaut-Somme-30381967"), … … 49 50 new WaterAgency("L", "La Réunion", "Réunion-30381991"), 50 51 }; 51 52 52 53 public EauxDeSurfaceHandler() { 53 54 setName("Eaux de surface"); 54 55 setArchiveHandler(new InternalZipHandler()); 55 56 } 56 57 57 58 @Override 58 59 public boolean acceptsFilename(String filename) { … … 63 64 return result; 64 65 } 65 66 66 67 @Override 67 68 public boolean acceptsUrl(String url) { … … 91 92 // TODO Auto-generated method stub 92 93 } 93 94 94 95 @Override 95 96 public List<Pair<String, URL>> getDataURLs() { … … 106 107 107 108 private Pair<String, URL> getDownloadURL(WaterAgency a) throws MalformedURLException { 108 return new Pair<>("SurfaceWater_"+a.name, new URL("http://www.rapportage.eaufrance.fr/sites/default/files/SIG/FR"+a.code+"_SW.zip")); 109 return new Pair<>("SurfaceWater_"+a.name, 110 new URL("http://www.rapportage.eaufrance.fr/sites/default/files/SIG/FR"+a.code+"_SW.zip")); 109 111 } 110 112 111 113 private class InternalZipHandler extends DefaultArchiveHandler { 112 114 @Override 113 115 public void notifyTempFileWritten(File file) { 114 if (file.getName().matches(SHP_PATTERN.replace("(.*)", "F")+"\\.prj")) {// Adour-Garonne .prj files cannot be parsed because they do not contain quotes...115 try{116 BufferedReader reader = new BufferedReader(new FileReader(file));116 // Adour-Garonne .prj files cannot be parsed because they do not contain quotes... 117 if (file.getName().matches(SHP_PATTERN.replace("(.*)", "F")+"\\.prj")) { 118 try (BufferedReader reader = new BufferedReader(new FileReader(file))) { 117 119 String line = reader.readLine(); 118 reader.close();119 120 if (!line.contains("\"")) { 120 121 for (String term : new String[]{"GCS_ETRS_1989", "D_ETRS_1989", "GRS_1980", "Greenwich", "Degree"}) { 121 122 line = line.replace(term, "\""+term+"\""); 122 123 } 123 BufferedWriter writer = new BufferedWriter(new FileWriter(file)) ;124 writer.write(line); 125 writer.close();124 try (BufferedWriter writer = new BufferedWriter(new FileWriter(file))) { 125 writer.write(line); 126 } 126 127 } 127 128 } catch (Exception e) { 128 e.printStackTrace();129 Main.error(e); 129 130 } 130 131 } -
applications/editors/josm/plugins/opendata/src/org/geotools/data/shapefile/files/TabFiles.java
r30731 r30738 717 717 * if a problem occurred opening the stream. 718 718 */ 719 @SuppressWarnings("resource") 719 720 @Override 720 721 public OutputStream getOutputStream(ShpFileType type, -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/NeptuneReader.java
r30723 r30738 4 4 import java.io.File; 5 5 import java.io.FileInputStream; 6 import java.io.FileNotFoundException;7 6 import java.io.IOException; 8 7 import java.io.InputStream; … … 54 53 /** 55 54 * NEPTUNE -> OSM converter 56 * See http://www.chouette.mobi/IMG/pdf/NF__F_-Neptune-maj.pdf 55 * See http://www.chouette.mobi/IMG/pdf/NF__F_-Neptune-maj.pdf 57 56 */ 58 57 public class NeptuneReader extends AbstractReader implements FrenchConstants { … … 81 80 schemas.add(NeptuneReader.class.getResource(NEPTUNE_XSD)); 82 81 } 83 82 84 83 private ChouettePTNetworkType root; 85 84 86 85 private final Map<String, OsmPrimitive> tridentObjects = new HashMap<>(); 87 86 88 87 public static final boolean acceptsXmlNeptuneFile(File file) { 89 88 return acceptsXmlNeptuneFile(file, null); … … 91 90 92 91 public static final boolean acceptsXmlNeptuneFile(File file, URL schemaURL) { 93 92 94 93 if (schemaURL == null) { 95 94 schemaURL = schemas.get(0); 96 95 } 97 98 try { 99 FileInputStream in = new FileInputStream(file); 96 97 try (FileInputStream in = new FileInputStream(file)) { 100 98 Source xmlFile = new StreamSource(in); 101 99 try { … … 112 110 Main.error(xmlFile.getSystemId() + " is NOT valid"); 113 111 Main.error("Reason: " + e.getLocalizedMessage()); 114 } finally {115 try {116 in.close();117 } catch (IOException e) {118 // Ignore exception119 }120 112 } 121 } catch ( FileNotFoundException e) {113 } catch (IOException e) { 122 114 Main.error(e.getMessage()); 123 115 } 124 116 125 117 return false; 126 118 } 127 119 128 120 public static DataSet parseDataSet(InputStream in, AbstractDataSetHandler handler, ProgressMonitor instance) throws JAXBException { 129 121 return new NeptuneReader().parse(in, instance); … … 138 130 return doc.getValue(); 139 131 } 140 132 141 133 private final void linkTridentObjectToOsmPrimitive(TridentObjectType object, OsmPrimitive p) { 142 134 p.put("ref:neptune", object.getObjectId()); … … 151 143 return n; 152 144 } 153 145 154 146 private Node createPlatform(StopPointType stop) { 155 147 Node n = createNode(createLatLon(stop)); … … 181 173 return r; 182 174 } 183 175 184 176 protected Relation createNetwork(PTNetworkType network) { 185 177 Relation r = createRelation(OSM_NETWORK); … … 188 180 return r; 189 181 } 190 182 191 183 protected Relation createRouteMaster(LineType line) { 192 184 Relation r = createPtRelation(OSM_ROUTE_MASTER, line); … … 219 211 return r; 220 212 } 221 213 222 214 protected Relation createStopArea(StopAreaType sa) { 223 215 Relation r = createPtRelation(OSM_STOP_AREA, sa); … … 225 217 return r; 226 218 } 227 219 228 220 protected LatLon createLatLon(PointType point) { 229 221 return new LatLon(point.getLatitude().doubleValue(), point.getLongitude().doubleValue()); 230 222 } 231 223 232 224 protected final <T extends TridentObjectType> T findTridentObject(List<T> list, String id) { 233 225 for (T object : list) { … … 238 230 return null; 239 231 } 240 232 241 233 protected StopPoint findStopPoint(String id) { 242 234 return findTridentObject(root.getChouetteLineDescription().getStopPoint(), id); … … 311 303 } 312 304 } 313 305 314 306 } else if (childId.contains("StopPoint")) { 315 307 StopPoint child = findStopPoint(childId); … … 352 344 addStopToRoute(route, start); 353 345 } 354 346 355 347 if (end == null) { 356 348 System.err.println("Cannot find end StopPoint: "+ptlink.getEndOfLink()); … … 361 353 } 362 354 } 363 355 364 356 return ds; 365 357 } 366 358 367 359 private static final boolean addStopToRoute(Relation route, OsmPrimitive stop) { 368 360 if (route.getMembersCount() == 0 || !route.getMember(route.getMembersCount()-1).getMember().equals(stop) ) { -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/archive/SevenZipReader.java
r30568 r30738 33 33 34 34 private final IInArchive archive = new Handler(); 35 35 36 36 public SevenZipReader(InputStream in, AbstractDataSetHandler handler, boolean promptUser) throws IOException { 37 37 super(handler, handler != null ? handler.getArchiveHandler() : null, promptUser); … … 41 41 Utils.copyStream(in, out); 42 42 } 43 IInStream random = new MyRandomAccessFile(tmpFile.getPath(), "r"); 44 if (archive.Open(random) != 0) { 45 String message = "Unable to open 7z archive: "+tmpFile.getPath(); 46 Main.warn(message); 47 random.close(); 48 if (!tmpFile.delete()) { 49 tmpFile.deleteOnExit(); 43 try (IInStream random = new MyRandomAccessFile(tmpFile.getPath(), "r")) { 44 if (archive.Open(random) != 0) { 45 String message = "Unable to open 7z archive: "+tmpFile.getPath(); 46 Main.warn(message); 47 if (!tmpFile.delete()) { 48 tmpFile.deleteOnExit(); 49 } 50 throw new IOException(message); 50 51 } 51 throw new IOException(message);52 52 } 53 53 } 54 55 public static DataSet parseDataSet(InputStream in, AbstractDataSetHandler handler, ProgressMonitor instance, boolean promptUser) 54 55 public static DataSet parseDataSet(InputStream in, AbstractDataSetHandler handler, ProgressMonitor instance, boolean promptUser) 56 56 throws IOException, XMLStreamException, FactoryConfigurationError, JAXBException { 57 57 return new SevenZipReader(in, handler, promptUser).parseDoc(instance); 58 58 } 59 59 60 public static Map<File, DataSet> parseDataSets(InputStream in, AbstractDataSetHandler handler, ProgressMonitor instance, boolean promptUser) 60 public static Map<File, DataSet> parseDataSets(InputStream in, AbstractDataSetHandler handler, ProgressMonitor instance, boolean promptUser) 61 61 throws IOException, XMLStreamException, FactoryConfigurationError, JAXBException { 62 62 return new SevenZipReader(in, handler, promptUser).parseDocs(instance); … … 71 71 archive.Extract(null, -1, IInArchive.NExtract_NAskMode_kExtract, new ExtractCallback(archive, temp, candidates)); 72 72 } 73 73 74 74 private class ExtractCallback extends ArchiveExtractCallback { 75 75 private final List<File> candidates; 76 76 77 77 public ExtractCallback(IInArchive archive, File tempDir, List<File> candidates) { 78 78 Init(archive); … … 81 81 } 82 82 83 @Override 83 @Override 84 84 public int GetStream(int index, OutputStream[] outStream, int askExtractMode) throws IOException { 85 85 int res = super.GetStream(index, outStream, askExtractMode); -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/archive/ZipReader.java
r30723 r30738 26 26 27 27 private final ZipInputStream zis; 28 28 29 29 private ZipEntry entry; 30 30 31 31 public ZipReader(InputStream in, AbstractDataSetHandler handler, boolean promptUser) { 32 32 super(handler, handler != null ? handler.getArchiveHandler() : null, promptUser); … … 34 34 } 35 35 36 public static DataSet parseDataSet(InputStream in, AbstractDataSetHandler handler, ProgressMonitor instance, boolean promptUser) 36 public static DataSet parseDataSet(InputStream in, AbstractDataSetHandler handler, ProgressMonitor instance, boolean promptUser) 37 37 throws IOException, XMLStreamException, FactoryConfigurationError, JAXBException { 38 38 return new ZipReader(in, handler, promptUser).parseDoc(instance); 39 39 } 40 40 41 public static Map<File, DataSet> parseDataSets(InputStream in, AbstractDataSetHandler handler, ProgressMonitor instance, boolean promptUser) 41 public static Map<File, DataSet> parseDataSets(InputStream in, AbstractDataSetHandler handler, ProgressMonitor instance, boolean promptUser) 42 42 throws IOException, XMLStreamException, FactoryConfigurationError, JAXBException { 43 43 return new ZipReader(in, handler, promptUser).parseDocs(instance); 44 44 } 45 45 46 @Override 46 47 protected void extractArchive(final File temp, final List<File> candidates) throws IOException, FileNotFoundException { 47 48 while ((entry = zis.getNextEntry()) != null) { … … 58 59 } 59 60 if (!entry.isDirectory()) { 60 if (!file.createNewFile()) { 61 if (!file.createNewFile()) { 61 62 throw new IOException("Could not create temp file: " + file.getAbsolutePath()); 62 63 } 63 64 // Write temp file 64 FileOutputStream fos = new FileOutputStream(file); 65 byte[] buffer = new byte[8192]; 66 int count = 0; 67 while ((count = zis.read(buffer, 0, buffer.length)) > 0) { 68 fos.write(buffer, 0, count); 65 try (FileOutputStream fos = new FileOutputStream(file)) { 66 byte[] buffer = new byte[8192]; 67 int count = 0; 68 while ((count = zis.read(buffer, 0, buffer.length)) > 0) { 69 fos.write(buffer, 0, count); 70 } 69 71 } 70 fos.close();71 72 // Allow handler to perform specific treatments (for example, fix invalid .prj files) 72 73 if (archiveHandler != null) { -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/tabular/CsvImporter.java
r30723 r30738 18 18 19 19 public class CsvImporter extends AbstractImporter { 20 20 21 21 public static final ExtensionFileFilter CSV_FILE_FILTER = new ExtensionFileFilter( 22 22 OdConstants.CSV_EXT, OdConstants.CSV_EXT, tr("CSV files") + " (*."+OdConstants.CSV_EXT+")"); 23 23 24 24 public static final String COLOMBUS_HEADER = "INDEX,TAG,DATE,TIME,LATITUDE N/S,LONGITUDE E/W,HEIGHT,SPEED,HEADING,FIX MODE,VALID,PDOP,HDOP,VDOP,VOX"; 25 25 26 26 public CsvImporter() { 27 27 super(CSV_FILE_FILTER); … … 46 46 boolean result = false; 47 47 if (file != null && file.isFile()) { 48 try { 49 BufferedReader reader = new BufferedReader(new FileReader(file)); 50 try { 51 String line = reader.readLine(); 52 result = line != null && line.equalsIgnoreCase(COLOMBUS_HEADER); 53 } finally { 54 reader.close(); 55 } 48 try (BufferedReader reader = new BufferedReader(new FileReader(file))) { 49 String line = reader.readLine(); 50 result = line != null && line.equalsIgnoreCase(COLOMBUS_HEADER); 56 51 } catch (IOException e) { 57 52 // Ignore exceptions -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/modules/ModuleInformation.java
r30731 r30738 73 73 this.name = name; 74 74 this.file = file; 75 FileInputStream fis = null; 76 JarInputStream jar = null; 77 try { 78 fis = new FileInputStream(file); 79 jar = new JarInputStream(fis); 75 try ( 76 FileInputStream fis = new FileInputStream(file); 77 JarInputStream jar = new JarInputStream(fis); 78 ) { 80 79 Manifest manifest = jar.getManifest(); 81 80 if (manifest == null) … … 85 84 } catch (IOException e) { 86 85 throw new ModuleException(name, e); 87 } finally {88 if (jar != null) {89 try {90 jar.close();91 } catch(IOException e) { /* ignore */ }92 }93 if (fis != null) {94 try {95 fis.close();96 } catch(IOException e) { /* ignore */ }97 }98 86 } 99 87 } -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/modules/ReadRemoteModuleInformationTask.java
r30563 r30738 25 25 import java.util.List; 26 26 27 import org.openstreetmap.josm.Main; 27 28 import org.openstreetmap.josm.data.Version; 28 29 import org.openstreetmap.josm.gui.PleaseWaitRunnable; … … 246 247 */ 247 248 protected void cacheModuleList(String site, String list) { 248 PrintWriter writer = null;249 249 try { 250 250 File moduleDir = OdPlugin.getInstance().getModulesDirectory(); 251 251 if (!moduleDir.exists()) { 252 252 if (! moduleDir.mkdirs()) { 253 System.err.println(tr("Warning: failed to create module directory ''{0}''. Cannot cache module list from module site ''{1}''.", moduleDir.toString(), site)); 253 Main.warn(tr("Warning: failed to create module directory ''{0}''. Cannot cache module list from module site ''{1}''.", 254 moduleDir.toString(), site)); 254 255 } 255 256 } 256 257 File cacheFile = createSiteCacheFile(moduleDir, site, CacheType.PLUGIN_LIST); 257 258 getProgressMonitor().subTask(tr("Writing module list to local cache ''{0}''", cacheFile.toString())); 258 writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(cacheFile), "utf-8")); 259 writer.write(list); 259 try (PrintWriter writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(cacheFile), "utf-8"))) { 260 writer.write(list); 261 } 260 262 } catch (IOException e) { 261 263 // just failed to write the cache file. No big deal, but log the exception anyway 262 e.printStackTrace(); 263 } finally { 264 if (writer != null) { 265 writer.flush(); 266 writer.close(); 267 } 264 Main.warn(e); 268 265 } 269 266 } … … 300 297 File [] f = new File(location).listFiles( 301 298 new FilenameFilter() { 299 @Override 302 300 public boolean accept(File dir, String name) { 303 301 return name.matches("^([0-9]+-)?site.*\\.txt$") || -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/util/NamesFrUtils.java
r30723 r30738 11 11 12 12 import org.apache.commons.lang3.text.WordUtils; 13 import org.openstreetmap.josm.Main; 13 14 import org.openstreetmap.josm.data.osm.OsmPrimitive; 14 15 import org.openstreetmap.josm.plugins.opendata.core.OdConstants; … … 16 17 17 18 public abstract class NamesFrUtils { 18 19 19 20 private static Map<String, String> dictionary = initDictionary(); 20 21 … … 29 30 return result; 30 31 } 31 32 32 33 private static Map<String, String> initDictionary() { 33 34 Map<String, String> result = new HashMap<>(); 34 try { 35 BufferedReader reader = new BufferedReader(new InputStreamReader( 36 SimpleDataSetHandler.class.getResourceAsStream(OdConstants.DICTIONARY_FR), OdConstants.UTF8)); 35 try (BufferedReader reader = new BufferedReader(new InputStreamReader( 36 SimpleDataSetHandler.class.getResourceAsStream(OdConstants.DICTIONARY_FR), OdConstants.UTF8))) { 37 37 String line = reader.readLine(); // Skip first line 38 38 while ((line = reader.readLine()) != null) { … … 40 40 result.put(tab[0].replace("\"", ""), tab[1].replace("\"", "")); 41 41 } 42 reader.close();43 42 } catch (IOException e) { 44 e.printStackTrace();43 Main.error(e); 45 44 } 46 45 return result; … … 170 169 if (value != null) { 171 170 value = WordUtils.capitalizeFully(value); 172 // Cas particuliers 171 // Cas particuliers 173 172 if (value.equals("Boulingrin")) { // square Boulingrin, mal formé 174 173 value = "Sq Boulingrin"; -
applications/editors/josm/plugins/opendata/util/opendata/ModuleListGenerator.java
r30340 r30738 15 15 import java.util.zip.ZipOutputStream; 16 16 17 import org.openstreetmap.josm.Main; 18 17 19 public class ModuleListGenerator { 18 20 … … 26 28 baseDir = args[0]; 27 29 } 28 try {30 try ( 29 31 BufferedWriter list = new BufferedWriter(new FileWriter(baseDir+"modules.txt")); 30 32 ZipOutputStream zip = new ZipOutputStream(new FileOutputStream(baseDir+"modules-icons.zip")); 33 ) { 31 34 for (File file : new File(baseDir+"dist").listFiles(new FilenameFilter() { 32 35 @Override … … 37 40 try { 38 41 String filename = file.getName(); 39 System.out.println("Processing "+filename);42 Main.info("Processing "+filename); 40 43 list.write(filename+";"+url+filename); list.newLine(); 41 44 Manifest mf = new JarFile(file).getManifest(); … … 77 80 } 78 81 } catch (IOException e) { 79 System.err.println("Cannot load Image-Icon: "+value.toString());82 Main.error("Cannot load Image-Icon: "+value.toString()); 80 83 } finally { 81 84 zip.closeEntry(); … … 84 87 } 85 88 } 86 89 87 90 } catch (IOException e) { 88 e.printStackTrace();91 Main.error(e); 89 92 } 90 93 } 91 System.out.println("Done");92 zip.close();93 list.close();94 94 } catch (IOException e) { 95 e.printStackTrace();95 Main.error(e); 96 96 } 97 97 }
Note:
See TracChangeset
for help on using the changeset viewer.
