Changeset 7248 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java
- Timestamp:
- 2014-06-14T12:40:50+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java
r7200 r7248 42 42 import org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.TokenMgrError; 43 43 import org.openstreetmap.josm.gui.preferences.SourceEntry; 44 import org.openstreetmap.josm.io. MirroredInputStream;44 import org.openstreetmap.josm.io.CachedFile; 45 45 import org.openstreetmap.josm.tools.CheckParameterUtil; 46 46 import org.openstreetmap.josm.tools.LanguageInfo; … … 275 275 return new ByteArrayInputStream(css.getBytes(StandardCharsets.UTF_8)); 276 276 } 277 MirroredInputStream in = getMirroredInputStream();277 CachedFile cf = getCachedFile(); 278 278 if (isZip) { 279 File file = in.getFile(); 280 Utils.close(in); 279 File file = cf.getFile(); 281 280 zipFile = new ZipFile(file, StandardCharsets.UTF_8); 282 281 zipIcons = file; … … 286 285 zipFile = null; 287 286 zipIcons = null; 288 return in;289 } 290 } 291 292 @Override 293 public MirroredInputStream getMirroredInputStream() throws IOException {294 return new MirroredInputStream(url, null,MAPCSS_STYLE_MIME_TYPES);287 return cf.getInputStream(); 288 } 289 } 290 291 @Override 292 public CachedFile getCachedFile() throws IOException { 293 return new CachedFile(url).setHttpAccept(MAPCSS_STYLE_MIME_TYPES); 295 294 } 296 295
Note:
See TracChangeset
for help on using the changeset viewer.