Changeset 30738 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreGrabber.java
- Timestamp:
- 2014-10-19T01:27:04+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreGrabber.java
r28961 r30738 22 22 private CadastreInterface wmsInterface = new CadastreInterface(); 23 23 24 public GeorefImage grab(WMSLayer wmsLayer, EastNorth lambertMin, EastNorth lambertMax) throws IOException, OsmTransferException {25 24 public GeorefImage grab(WMSLayer wmsLayer, EastNorth lambertMin, EastNorth lambertMax) 25 throws IOException, OsmTransferException { 26 26 try { 27 27 URL url = null; … … 88 88 wmsInterface.urlConn.setRequestMethod("GET"); 89 89 wmsInterface.setCookie(); 90 InputStream is = new ProgressInputStream(wmsInterface.urlConn, NullProgressMonitor.INSTANCE); 91 BufferedImage img = ImageIO.read(is); 92 is.close(); 93 return img; 90 try (InputStream is = new ProgressInputStream(wmsInterface.urlConn, NullProgressMonitor.INSTANCE)) { 91 return ImageIO.read(is); 92 } 94 93 } 95 94 … … 97 96 return wmsInterface; 98 97 } 99 100 98 }
Note:
See TracChangeset
for help on using the changeset viewer.