Changeset 30495 in osm for applications/editors/josm/plugins/canvec_helper/src
- Timestamp:
- 2014-06-14T14:05:38+02:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanVecTile.java
r29989 r30495 13 13 import org.openstreetmap.josm.gui.MapView; 14 14 import org.openstreetmap.josm.io.IllegalDataException; 15 import org.openstreetmap.josm.io. MirroredInputStream;15 import org.openstreetmap.josm.io.CachedFile; 16 16 import java.awt.Graphics2D; 17 17 import java.awt.Polygon; … … 183 183 File download_path = new File(layer.plugin_self.getPluginDir() + File.separator); 184 184 download_path.mkdir(); 185 MirroredInputStream tile_zip; 186 tile_zip = new MirroredInputStream(getDownloadUrl(),download_path.toString()); 185 CachedFile tile_zip = new CachedFile(getDownloadUrl()).setDestDir(download_path.toString()); 187 186 return new ZipFile(tile_zip.getFile()); 188 187 } -
applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanvecLayer.java
r29989 r30495 9 9 import java.awt.Toolkit; 10 10 import java.io.BufferedReader; 11 import java.io.InputStream; 11 12 import java.io.InputStreamReader; 12 13 import java.io.IOException; … … 27 28 import org.openstreetmap.josm.gui.layer.Layer; 28 29 import org.openstreetmap.josm.gui.MapView; 29 import org.openstreetmap.josm.io. MirroredInputStream;30 import org.openstreetmap.josm.io.CachedFile; 30 31 import static org.openstreetmap.josm.tools.I18n.tr; 31 32 … … 51 52 long start = System.currentTimeMillis(); 52 53 Pattern p = Pattern.compile("(\\d\\d\\d)([A-Z]\\d\\d).*"); 53 MirroredInputStream index = new MirroredInputStream("http://ftp2.cits.rncan.gc.ca/OSM/pub/ZippedOsm.txt");54 InputStream index = new CachedFile("http://ftp2.cits.rncan.gc.ca/OSM/pub/ZippedOsm.txt").getInputStream(); 54 55 BufferedReader br = new BufferedReader(new InputStreamReader(index)); 55 56 String line;
Note:
See TracChangeset
for help on using the changeset viewer.