|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensaml.util.resource.AbstractFilteredResource
org.opensaml.util.resource.HttpResource
public class HttpResource
A resource representing a file retrieved from a URL using Apache Commons HTTPClient.
| Nested Class Summary | |
|---|---|
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. |
| Field Summary | |
|---|---|
private org.apache.commons.httpclient.HttpClient |
httpClient
HTTP client. |
private String |
resourceUrl
HTTP URL of the resource. |
| Constructor Summary | |
|---|---|
HttpResource(String resource)
Constructor. |
|
HttpResource(String resource,
ResourceFilter resourceFilter)
Deprecated. use AbstractFilteredResource.setResourceFilter(ResourceFilter) instead |
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
|
boolean |
exists()
Checks whether the resource exists. |
InputStream |
getInputStream()
Gets the inputstream to the resource's data. |
org.joda.time.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()
|
| Methods inherited from class org.opensaml.util.resource.AbstractFilteredResource |
|---|
applyFilter, getResourceFilter, setResourceFilter |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private String resourceUrl
private org.apache.commons.httpclient.HttpClient httpClient
| Constructor Detail |
|---|
public HttpResource(String resource)
resource - HTTP(S) URL of the resource
public HttpResource(String resource,
ResourceFilter resourceFilter)
AbstractFilteredResource.setResourceFilter(ResourceFilter) instead
resource - HTTP(S) URL of the resourceresourceFilter - filter to apply to this resource| Method Detail |
|---|
public boolean exists()
throws ResourceException
ResourceException - thrown if there is a problem determining if the resource exists
public InputStream getInputStream()
throws ResourceException
ResourceException - thrown if an input stream can not be created for the resource
public org.joda.time.DateTime getLastModifiedTime()
throws ResourceException
ResourceException - thrown if the last modified time can not be determinedpublic String getLocation()
public String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object o)
equals in class Object
protected org.apache.commons.httpclient.methods.GetMethod getResource()
throws ResourceException
ResourceException - thrown if the resource could not be fetched
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||