public class FileBackedHTTPResource extends HTTPResource
| Modifier and Type | Field and Description |
|---|---|
private org.springframework.core.io.Resource |
backingResource
Backing resource file.
|
private org.slf4j.Logger |
log
Logger.
|
| Constructor and Description |
|---|
FileBackedHTTPResource(HttpClient client,
String url,
org.springframework.core.io.Resource resource)
Deprecated.
|
FileBackedHTTPResource(HttpClient client,
URL url,
org.springframework.core.io.Resource resource)
Deprecated.
|
FileBackedHTTPResource(String backingFile,
HttpClient client,
String url)
Constructor.
|
FileBackedHTTPResource(String backingFile,
HttpClient client,
URL url)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
long |
contentLength() |
HTTPResource |
createRelative(String relativePath)
Based on
UrlResource. |
boolean |
exists() |
String |
getDescription() |
InputStream |
getInputStream() |
long |
lastModified() |
protected InputStream |
saveAndClone(InputStream input)
saveAndClone.
|
afterPropertiesSet, buildHttpClientContext, closeResponse, createRelativeResource, getFile, getFilename, getResourceHeaders, getResponseHeader, getURI, getURL, isOpen, isReadable, reportCachingStatus, setBeanName, setHttpClientContextHandlerdoInitialize, getId, setIddestroy, doDestroy, initialize, isDestroyed, isInitialized@Nonnull private final org.slf4j.Logger log
@Nonnull private final org.springframework.core.io.Resource backingResource
@Deprecated public FileBackedHTTPResource(@Nonnull @ParameterName(name="client") HttpClient client, @NotEmpty @Nonnull @ParameterName(name="url") String url, @Nonnull @ParameterName(name="resource") org.springframework.core.io.Resource resource) throws IOException
FileBackedHTTPResource(String, HttpClient, String)client - the client we use to connect with.url - URL to the remote dataresource - the file to use as backing storeIOException - if the URL was badly formed@Deprecated public FileBackedHTTPResource(@Nonnull @ParameterName(name="client") HttpClient client, @Nonnull @NotEmpty @ParameterName(name="url") URL url, @Nonnull @ParameterName(name="resource") org.springframework.core.io.Resource resource) throws IOException
FileBackedHTTPResource(String, HttpClient, URL)client - the client we use to connect with.url - URL to the remote dataresource - the file to use as backing storeIOException - if the URL was badly formedpublic FileBackedHTTPResource(@Nonnull @ParameterName(name="backingFile") String backingFile, @Nonnull @ParameterName(name="client") HttpClient client, @NotEmpty @Nonnull @ParameterName(name="url") String url) throws IOException
backingFile - the file to use as backing storeclient - the client we use to connect with.url - URL to the remote dataIOException - if the URL was badly formedpublic FileBackedHTTPResource(@Nonnull @ParameterName(name="backingFile") String backingFile, @Nonnull @ParameterName(name="client") HttpClient client, @Nonnull @ParameterName(name="url") URL url) throws IOException
backingFile - the file to use as backing storeclient - the client we use to connect with.url - URL to the remote dataIOException - if the URL was badly formedprotected InputStream saveAndClone(InputStream input) throws IOException
input - the input streamIOException - if an error happens. If the backing file might have been corrupted we delete it.public InputStream getInputStream() throws IOException
getInputStream in interface ResourcegetInputStream in interface org.springframework.core.io.InputStreamSourcegetInputStream in class HTTPResourceIOExceptionpublic boolean exists()
exists in interface Resourceexists in class HTTPResourcepublic long contentLength()
throws IOException
contentLength in interface ResourcecontentLength in class HTTPResourceIOExceptionpublic long lastModified()
throws IOException
lastModified in interface ResourcelastModified in class HTTPResourceIOExceptionpublic HTTPResource createRelative(String relativePath) throws IOException
UrlResource.createRelative in class HTTPResourceIOExceptionpublic String getDescription()
getDescription in interface ResourcegetDescription in class HTTPResourceCopyright © 1999–2019 Shibboleth Consortium. All rights reserved.