Changeset 19050 in josm for trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java
- Timestamp:
- 2024-04-22T20:59:26+02:00 (4 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java
r18832 r19050 77 77 TimeUnit.SECONDS, 78 78 // make queue of LIFO type - so recently requested tiles will be loaded first (assuming that these are which user is waiting to see) 79 new LinkedBlockingDeque< Runnable>(),79 new LinkedBlockingDeque<>(), 80 80 Utils.newThreadFactory("JCS-downloader-%d", Thread.NORM_PRIORITY) 81 81 ); … … 323 323 } 324 324 try (InputStream fileInputStream = Files.newInputStream(file.toPath())) { 325 cacheData = createCacheEntry( Utils.readBytesFromStream(fileInputStream));325 cacheData = createCacheEntry(fileInputStream.readAllBytes()); 326 326 cache.put(getCacheKey(), cacheData, attributes); 327 327 return true; … … 394 394 byte[] raw; 395 395 if (urlConn.getResponseCode() == HttpURLConnection.HTTP_OK) { 396 raw = Utils.readBytesFromStream(urlConn.getContent());396 raw = urlConn.getContent().readAllBytes(); 397 397 } else { 398 398 raw = new byte[]{};
Note:
See TracChangeset
for help on using the changeset viewer.