Ignore:
Timestamp:
2014-06-14T12:40:50+02:00 (7 years ago)
Author:
bastiK
Message:

reworked MirroredInputStream (renamed to CachedFile):

  • no more awkwardly open and close InputStream if you just want the underlying file (e.g. to get file inside zip file)
  • make it easier to add configuration parameters, without having endless list of parameters for the constructor (Factory style, similar to ImageProvider)

breaks plugins; see #10139

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java

    r7242 r7248  
    2222import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
    2323import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    24 import org.openstreetmap.josm.io.MirroredInputStream;
     24import org.openstreetmap.josm.io.CachedFile;
    2525import org.openstreetmap.josm.tools.CheckParameterUtil;
    2626import org.xml.sax.SAXException;
     
    125125            URL url = new URL(pi.downloadlink);
    126126            synchronized(this) {
    127                 downloadConnection = MirroredInputStream.connectFollowingRedirect(url, PLUGIN_MIME_TYPES, null);
     127                downloadConnection = CachedFile.connectFollowingRedirect(url, PLUGIN_MIME_TYPES, null);
    128128            }
    129129            try (
Note: See TracChangeset for help on using the changeset viewer.