public class HttpResource extends AbstractFilteredResource
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.
|
org.joda.time.DateTime |
getLastModifiedTime()
Gets the date and time the resource was last modified.
|
String |
getLocation()
Gets resource location information.
|
protected GetMethod |
getResource()
Gets remote resource.
|
int |
hashCode() |
String |
toString() |
applyFilter, getResourceFilter, setResourceFilter
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 org.joda.time.DateTime getLastModifiedTime() throws ResourceException
ResourceException
- thrown if the last modified time can not be determinedpublic String getLocation()
protected GetMethod getResource() throws ResourceException
ResourceException
- thrown if the resource could not be fetchedCopyright © 2018 JBoss by Red Hat. All rights reserved.