org.opensaml.util.resource
public class HttpResource extends AbstractFilteredResource
Modifier and Type | Class and Description |
---|---|
private static class |
HttpResource.ConnectionClosingInputStream
A wrapper around the
InputStream returned by a HttpMethod that closes the stream and releases the
HTTP connection when HttpResource.ConnectionClosingInputStream.close() is invoked. |
Modifier and Type | Field and Description |
---|---|
private org.apache.commons.httpclient.HttpClient |
httpClient
HTTP client.
|
private String |
resourceUrl
HTTP URL of the resource.
|
Constructor and Description |
---|
HttpResource(String resource)
Constructor.
|
HttpResource(String resource,
ResourceFilter resourceFilter)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
boolean |
exists()
Checks whether the resource exists.
|
InputStream |
getInputStream()
Gets the inputstream to the resource's data.
|
DateTime |
getLastModifiedTime()
Gets the date and time the resource was last modified.
|
String |
getLocation()
Gets resource location information.
|
protected org.apache.commons.httpclient.methods.GetMethod |
getResource()
Gets remote resource.
|
int |
hashCode() |
String |
toString() |
applyFilter, getResourceFilter, setResourceFilter
private String resourceUrl
private org.apache.commons.httpclient.HttpClient httpClient
public HttpResource(String resource)
resource
- HTTP(S) URL of the resourcepublic HttpResource(String resource, ResourceFilter resourceFilter)
AbstractFilteredResource.setResourceFilter(ResourceFilter)
insteadresource
- HTTP(S) URL of the resourceresourceFilter
- filter to apply to this resourcepublic boolean exists() throws ResourceException
ResourceException
- thrown if there is a problem determining if the resource existspublic InputStream getInputStream() throws ResourceException
ResourceException
- thrown if an input stream can not be created for the resourcepublic DateTime getLastModifiedTime() throws ResourceException
ResourceException
- thrown if the last modified time can not be determinedpublic String getLocation()
protected org.apache.commons.httpclient.methods.GetMethod getResource() throws ResourceException
ResourceException
- thrown if the resource could not be fetchedCopyright © 1999-2013 JBoss by Red Hat. All Rights Reserved.