Changeset 9171 in josm for trunk/src/org/openstreetmap/josm/data/imagery
- Timestamp:
- 2015-12-26T23:42:00+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/CachedAttributionBingAerialTileSource.java
r8836 r9171 6 6 import java.net.URL; 7 7 import java.util.List; 8 import java.util.Scanner;9 8 import java.util.concurrent.Callable; 10 9 … … 14 13 import org.openstreetmap.josm.gui.util.GuiHelper; 15 14 import org.openstreetmap.josm.io.CacheCustomContent; 16 import org.openstreetmap.josm.io.UTFInputStreamReader; 17 import org.openstreetmap.josm.tools.Utils; 15 import org.openstreetmap.josm.tools.HttpClient; 18 16 import org.xml.sax.InputSource; 19 17 … … 55 53 protected byte[] updateData() throws IOException { 56 54 URL u = getAttributionUrl(); 57 try (Scanner scanner = new Scanner(UTFInputStreamReader.create(Utils.openURL(u)))) { 58 String r = scanner.useDelimiter("\\A").next(); 59 Main.info("Successfully loaded Bing attribution data."); 60 return r.getBytes("UTF-8"); 61 } 55 final String r = HttpClient.create(u).connect().fetchContent(); 56 Main.info("Successfully loaded Bing attribution data."); 57 return r.getBytes("UTF-8"); 62 58 } 63 59 }
Note:
See TracChangeset
for help on using the changeset viewer.