public class DownloadingUrlResource
extends org.springframework.core.io.UrlResource
Resource implementation that will download a UrlResource to a temp file when
the is invoked.| Constructor and Description |
|---|
DownloadingUrlResource(String uri)
Create a new
DownloadingUrlResource based on the given URI object. |
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription() |
File |
getFile()
Downloads the file from the HTTP location to a temporary file.
|
createRelative, equals, getFilename, getInputStream, getURI, getURL, hashCode, isFilepublic DownloadingUrlResource(String uri) throws MalformedURLException
DownloadingUrlResource based on the given URI object.uri - a URIMalformedURLException - if the given URL path is not validpublic File getFile() throws IOException
getFile in interface org.springframework.core.io.ResourcegetFile in class org.springframework.core.io.UrlResourceIOException - if there are errors downloading or writing the temporary file.public String getDescription()
getDescription in interface org.springframework.core.io.ResourcegetDescription in class org.springframework.core.io.UrlResourceCopyright © 2019 Pivotal Software, Inc.. All rights reserved.