Changeset 30495 in osm for applications/editors/josm
- Timestamp:
- 2014-06-14T14:05:38+02:00 (11 years ago)
- Location:
- applications/editors/josm/plugins
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/canvec_helper/build.xml
r30416 r30495 4 4 <property name="commit.message" value="JOSM/Canvec_helper: fixed a crash caused by osm directory being renamed to OSM"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value="7 001"/>6 <property name="plugin.main.version" value="7248"/> 7 7 8 8 <!-- Configure these properties (replace "..." accordingly). -
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; -
applications/editors/josm/plugins/imagery-xml-bounds/build.xml
r30416 r30495 4 4 <property name="commit.message" value="Commit message"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value="7 001"/>6 <property name="plugin.main.version" value="7248"/> 7 7 8 8 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/io/ValidatingImageryReader.java
r30342 r30495 9 9 import javax.xml.validation.SchemaFactory; 10 10 11 import org.openstreetmap.josm.io. MirroredInputStream;11 import org.openstreetmap.josm.io.CachedFile; 12 12 import org.openstreetmap.josm.io.imagery.ImageryReader; 13 13 import org.openstreetmap.josm.plugins.imageryxmlbounds.XmlBoundsConstants; … … 34 34 public static void validate(String source) throws SAXException, IOException { 35 35 SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); 36 Schema schema = factory.newSchema(new StreamSource(new MirroredInputStream(XML_SCHEMA)));36 Schema schema = factory.newSchema(new StreamSource(new CachedFile(XML_SCHEMA).getInputStream())); 37 37 schema.newValidator().validate(new StreamSource(source)); 38 38 } -
applications/editors/josm/plugins/mirrored_download/build.xml
r30416 r30495 5 5 <property name="commit.message" value=""/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value="7 001"/>7 <property name="plugin.main.version" value="7248"/> 8 8 9 9 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/mirrored_download/src/mirrored_download/UrlSelectionDialog.java
r30436 r30495 25 25 26 26 import org.openstreetmap.josm.Main; 27 import org.openstreetmap.josm.io. MirroredInputStream;27 import org.openstreetmap.josm.io.CachedFile; 28 28 29 29 public class UrlSelectionDialog … … 106 106 Collection<String> urls = new ArrayList<String>(); 107 107 try ( 108 InputStream in = new MirroredInputStream(src, 24*60*60);108 InputStream in = new CachedFile(src).setMaxAge(24*60*60).getInputStream(); 109 109 BufferedReader reader = new BufferedReader(new InputStreamReader(in)) 110 110 ) { -
applications/editors/josm/plugins/pbf/build.xml
r30490 r30495 3 3 4 4 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 5 <property name="plugin.main.version" value="7 001"/>5 <property name="plugin.main.version" value="7248"/> 6 6 7 7 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/pbf/src/org/openstreetmap/josm/plugins/pbf/io/PbfImporter.java
r30341 r30495 9 9 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 10 10 import org.openstreetmap.josm.io.IllegalDataException; 11 import org.openstreetmap.josm.io. MirroredInputStream;11 import org.openstreetmap.josm.io.CachedFile; 12 12 import org.openstreetmap.josm.io.OsmImporter; 13 13 import org.openstreetmap.josm.plugins.pbf.PbfConstants; … … 30 30 31 31 protected DataSet parseDataSet(final String source) throws IOException, SAXException, IllegalDataException { 32 return parseDataSet(new MirroredInputStream(source), NullProgressMonitor.INSTANCE);32 return parseDataSet(new CachedFile(source).getInputStream(), NullProgressMonitor.INSTANCE); 33 33 } 34 34 } -
applications/editors/josm/plugins/poly/build.xml
r30416 r30495 5 5 <property name="commit.message" value="Commit message"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value="7 001"/>7 <property name="plugin.main.version" value="7248"/> 8 8 9 9 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/poly/src/poly/PolyImporter.java
r28755 r30495 20 20 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 21 21 import org.openstreetmap.josm.io.IllegalDataException; 22 import org.openstreetmap.josm.io. MirroredInputStream;22 import org.openstreetmap.josm.io.CachedFile; 23 23 import org.openstreetmap.josm.io.OsmImporter; 24 24 import org.openstreetmap.josm.tools.CheckParameterUtil; … … 36 36 37 37 protected DataSet parseDataSet( final String source ) throws IOException, SAXException, IllegalDataException { 38 return parseDataSet(new MirroredInputStream(source), NullProgressMonitor.INSTANCE);38 return parseDataSet(new CachedFile(source).getInputStream(), NullProgressMonitor.INSTANCE); 39 39 } 40 40 -
applications/editors/josm/plugins/roadsigns/build.xml
r30416 r30495 4 4 <property name="commit.message" value="preset maintenance (Fahrradstraße)"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value="7 001"/>6 <property name="plugin.main.version" value="7248"/> 7 7 8 8 <!-- -
applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignsPlugin.java
r30438 r30495 30 30 import org.openstreetmap.josm.gui.ExtendedDialog; 31 31 import org.openstreetmap.josm.gui.dialogs.properties.PropertiesDialog; 32 import org.openstreetmap.josm.io. MirroredInputStream;32 import org.openstreetmap.josm.io.CachedFile; 33 33 import org.openstreetmap.josm.plugins.Plugin; 34 34 import org.openstreetmap.josm.plugins.PluginInformation; … … 244 244 InputStream in = null; 245 245 if (source.startsWith("http://") || source.startsWith("https://") || source.startsWith("ftp://")) { 246 in = new MirroredInputStream(source);246 in = new CachedFile(source).getInputStream(); 247 247 } else if (source.startsWith("file:")) { 248 248 in = new URL(source).openStream();
Note:
See TracChangeset
for help on using the changeset viewer.