Changeset 33514 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreGrabber.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/CadastreGrabber.java
r33392 r33514 7 7 import java.io.IOException; 8 8 import java.io.InputStream; 9 import java.net.HttpURLConnection;10 9 import java.net.MalformedURLException; 11 10 import java.net.URL; … … 15 14 import org.openstreetmap.josm.Main; 16 15 import org.openstreetmap.josm.data.coor.EastNorth; 17 import org.openstreetmap.josm.gui.progress.NullProgressMonitor;18 16 import org.openstreetmap.josm.io.OsmTransferException; 19 import org.openstreetmap.josm.io.ProgressInputStream;20 17 21 18 public class CadastreGrabber { … … 86 83 87 84 private BufferedImage grab(URL url) throws IOException, OsmTransferException { 88 wmsInterface.urlConn = (HttpURLConnection) url.openConnection(); 89 wmsInterface.urlConn.setRequestProperty("Connection", "close"); 90 wmsInterface.urlConn.setRequestMethod("GET"); 91 wmsInterface.setCookie(); 92 try (InputStream is = new ProgressInputStream(wmsInterface.urlConn, NullProgressMonitor.INSTANCE)) { 85 try (InputStream is = wmsInterface.getContent(url)) { 93 86 return ImageIO.read(is); 94 87 }
Note:
See TracChangeset
for help on using the changeset viewer.
