Changeset 33514 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGBuilding.java
- Timestamp:
- 2017-08-23T00:34:13+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGBuilding.java
r32556 r33514 11 11 import java.io.InputStream; 12 12 import java.io.InputStreamReader; 13 import java.net.HttpURLConnection;14 13 import java.net.MalformedURLException; 15 14 import java.net.URL; … … 31 30 import org.openstreetmap.josm.gui.MapView; 32 31 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 33 import org.openstreetmap.josm.gui.progress.NullProgressMonitor;34 32 import org.openstreetmap.josm.io.OsmTransferException; 35 import org.openstreetmap.josm.io.ProgressInputStream;36 33 37 34 public class DownloadSVGBuilding extends PleaseWaitRunnable { … … 243 240 244 241 private String grabSVG(URL url) throws IOException, OsmTransferException { 245 wmsInterface.urlConn = (HttpURLConnection) url.openConnection();246 wmsInterface.urlConn.setRequestProperty("Connection", "close");247 wmsInterface.urlConn.setRequestMethod("GET");248 wmsInterface.setCookie();249 242 File file = new File(CadastrePlugin.cacheDir + "building.svg"); 250 243 String svg = ""; 251 try (InputStream is = new ProgressInputStream(wmsInterface.urlConn, NullProgressMonitor.INSTANCE)) {244 try (InputStream is = wmsInterface.getContent(url)) { 252 245 if (file.exists()) 253 246 file.delete();
Note:
See TracChangeset
for help on using the changeset viewer.
