Changeset 7248 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.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/xml/XmlStyleSource.java
r7083 r7248 29 29 import org.openstreetmap.josm.gui.mappaint.StyleSource; 30 30 import org.openstreetmap.josm.gui.preferences.SourceEntry; 31 import org.openstreetmap.josm.io. MirroredInputStream;31 import org.openstreetmap.josm.io.CachedFile; 32 32 import org.openstreetmap.josm.tools.Utils; 33 33 import org.openstreetmap.josm.tools.XmlObjectParser; … … 104 104 @Override 105 105 public InputStream getSourceInputStream() throws IOException { 106 MirroredInputStream in = getMirroredInputStream();107 InputStream zip = in.findZipEntryInputStream("xml", "style");106 CachedFile cf = getCachedFile(); 107 InputStream zip = cf.findZipEntryInputStream("xml", "style"); 108 108 if (zip != null) { 109 zipIcons = in.getFile();109 zipIcons = cf.getFile(); 110 110 return zip; 111 111 } else { 112 112 zipIcons = null; 113 return in;114 } 115 } 116 117 @Override 118 public MirroredInputStream getMirroredInputStream() throws IOException {119 return new MirroredInputStream(url, null,XML_STYLE_MIME_TYPES);113 return cf.getInputStream(); 114 } 115 } 116 117 @Override 118 public CachedFile getCachedFile() throws IOException { 119 return new CachedFile(url).setHttpAccept(XML_STYLE_MIME_TYPES); 120 120 } 121 121
Note:
See TracChangeset
for help on using the changeset viewer.