/** * Returns the file name from the URL this Image was * constructed from. */ public String getFileName() { return NetUtils.getFileNameForUrl(mSourceUrl); }
/** * Factory method that retrieves the image associated with the @a * urlToDownload and creates an Image to encapsulate it. */ protected Image downloadImage(URL url) { return new Image(url, NetUtils.downloadContent(url)); }
try (InputStream istream = getInputStream(url)) {