public class FileBackedHTTPResource extends HTTPResource
| Modifier and Type | Field and Description |
|---|---|
private Resource |
backingResource
Backing resource file.
|
private Logger |
log
Logger.
|
| Constructor and Description |
|---|
FileBackedHTTPResource(HttpClient client,
String url,
Resource resource)
Deprecated.
|
FileBackedHTTPResource(HttpClient client,
URL url,
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, setBeanNamedoInitialize, getId, setIdprivate final Logger log
private final Resource backingResource
@Deprecated public FileBackedHTTPResource(@Nonnull@ParameterName(name="client") HttpClient client, @NotEmpty@Nonnull@ParameterName(name="url") String url, @Nonnull@ParameterName(name="resource") 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") 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 net.shibboleth.utilities.java.support.resource.ResourcegetInputStream in interface InputStreamSourcegetInputStream in class HTTPResourceIOExceptionpublic boolean exists()
exists in interface net.shibboleth.utilities.java.support.resource.Resourceexists in class HTTPResourcepublic long contentLength()
throws IOException
contentLength in interface net.shibboleth.utilities.java.support.resource.ResourcecontentLength in class HTTPResourceIOExceptionpublic long lastModified()
throws IOException
lastModified in interface net.shibboleth.utilities.java.support.resource.ResourcelastModified in class HTTPResourceIOExceptionpublic HTTPResource createRelative(String relativePath) throws IOException
UrlResource.createRelative in class HTTPResourceIOExceptionpublic String getDescription()
getDescription in interface net.shibboleth.utilities.java.support.resource.ResourcegetDescription in class HTTPResourceCopyright © 1999–2016 Shibboleth Consortium. All rights reserved.