|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensaml.util.resource.HttpResource
public class HttpResource
A resource representing a file retrieved from a URL using Apache Commons' HTTPClient.
Constructor Summary | |
---|---|
HttpResource(String resource)
Constructor. |
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 java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HttpResource(String resource)
resource
- HTTP(S) URL of the resourceMethod Detail |
---|
public boolean exists() throws ResourceException
exists
in interface Resource
ResourceException
- thrown if there is a problem determining if the resource existspublic InputStream getInputStream() throws ResourceException
getInputStream
in interface Resource
ResourceException
- thrown if an input stream can not be created for the resourcepublic org.joda.time.DateTime getLastModifiedTime() throws ResourceException
getLastModifiedTime
in interface Resource
ResourceException
- thrown if the last modified time can not be determinedpublic String getLocation()
getLocation
in interface Resource
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public 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 |