/** * Transform URL to a File by downloading each image via its * URL and storing it. */ private File downloadAndStoreImage(URL url) { return BlockingTask // This call ensures the common fork/join thread pool // is expanded to handle the blocking image download. .callInManagedBlock(() -> downloadImage(url)) // Store the image on the local device. .store(); }