Changeset 7058 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2014-05-04T13:01:26+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java
r7033 r7058 44 44 * <li>{@code file:///SOME/FILE} the same as above</li> 45 45 * <li>{@code resource://SOME/FILE} file from the classpath (usually in the current *.jar)</li> 46 * <li>{@code josmdir://SOME/FILE} file inside josm config directory (since r7058)</li> 46 47 * <li>{@code http://...} a URL. It will be cached on disk.</li></ul> 47 48 * @throws IOException when the resource with the given name could not be retrieved … … 58 59 * <li>{@code file:///SOME/FILE} the same as above</li> 59 60 * <li>{@code resource://SOME/FILE} file from the classpath (usually in the current *.jar)</li> 61 * <li>{@code josmdir://SOME/FILE} file inside josm config directory (since r7058)</li> 60 62 * <li>{@code http://...} a URL. It will be cached on disk.</li></ul> 61 63 * @param maxTime the maximum age of the cache file (in seconds) … … 73 75 * <li>{@code file:///SOME/FILE} the same as above</li> 74 76 * <li>{@code resource://SOME/FILE} file from the classpath (usually in the current *.jar)</li> 77 * <li>{@code josmdir://SOME/FILE} file inside josm config directory (since r7058)</li> 75 78 * <li>{@code http://...} a URL. It will be cached on disk.</li></ul> 76 79 * @param destDir the destination directory for the cache file. Only applies for URLs. … … 88 91 * <li>{@code file:///SOME/FILE} the same as above</li> 89 92 * <li>{@code resource://SOME/FILE} file from the classpath (usually in the current *.jar)</li> 93 * <li>{@code josmdir://SOME/FILE} file inside josm config directory (since r7058)</li> 90 94 * <li>{@code http://...} a URL. It will be cached on disk.</li></ul> 91 95 * @param destDir the destination directory for the cache file. Only applies for URLs. … … 104 108 * <li>{@code file:///SOME/FILE} the same as above</li> 105 109 * <li>{@code resource://SOME/FILE} file from the classpath (usually in the current *.jar)</li> 110 * <li>{@code josmdir://SOME/FILE} file inside josm config directory (since r7058)</li> 106 111 * <li>{@code http://...} a URL. It will be cached on disk.</li></ul> 107 112 * @param destDir the destination directory for the cache file. Only applies for URLs. … … 121 126 * <li>{@code file:///SOME/FILE} the same as above</li> 122 127 * <li>{@code resource://SOME/FILE} file from the classpath (usually in the current *.jar)</li> 128 * <li>{@code josmdir://SOME/FILE} file inside josm config directory (since r7058)</li> 123 129 * <li>{@code http://...} a URL. It will be cached on disk.</li></ul> 124 130 * @param destDir the destination directory for the cache file. Only applies for URLs. … … 147 153 throw new IOException(tr("Failed to open input stream for resource ''{0}''", name)); 148 154 return; 149 } 150 file = new File(name); 155 } else if (name.startsWith("josmdir://")) { 156 file = new File(Main.pref.getPreferencesDir(), name.substring("josmdir://".length())); 157 } else { 158 file = new File(name); 159 } 151 160 } 152 161 if (file == null)
Note:
See TracChangeset
for help on using the changeset viewer.