Changeset 9414 in josm for trunk/src/org/openstreetmap/josm/io/imagery
- Timestamp:
- 2016-01-11T19:07:11+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
r9412 r9414 21 21 import org.openstreetmap.josm.data.imagery.Shape; 22 22 import org.openstreetmap.josm.io.CachedFile; 23 import org.openstreetmap.josm. io.UTFInputStreamReader;23 import org.openstreetmap.josm.tools.HttpClient; 24 24 import org.openstreetmap.josm.tools.LanguageInfo; 25 25 import org.openstreetmap.josm.tools.Utils; … … 33 33 private final String source; 34 34 private transient CachedFile cachedFile; 35 private transient boolean fastFail; 35 36 36 37 private enum State { … … 56 57 try { 57 58 cachedFile = new CachedFile(source); 59 cachedFile.setFastFail(fastFail); 58 60 try (BufferedReader in = cachedFile 59 61 .setMaxAge(CachedFile.DAYS) … … 359 361 } 360 362 363 /** 364 * Sets whether opening HTTP connections should fail fast, i.e., whether a 365 * {@link HttpClient#setConnectTimeout(int) low connect timeout} should be used. 366 * @param fastFail whether opening HTTP connections should fail fast 367 * @see CachedFile#setFastFail(boolean) 368 */ 369 public void setFastFail(boolean fastFail) { 370 this.fastFail = fastFail; 371 } 372 361 373 @Override 362 374 public void close() throws IOException {
Note:
See TracChangeset
for help on using the changeset viewer.