public class URLResource extends AbstractResource<URL>
flags, parent, resourceFactory| Constructor and Description |
|---|
URLResource(ResourceFactory factory,
URL url) |
| Modifier and Type | Method and Description |
|---|---|
Resource<URL> |
createFrom(URL url)
Create a new resource instance for the target resource reference of the type that this current resource is.
|
boolean |
delete()
Delete this resource, return true if successful, false if not.
|
boolean |
delete(boolean recursive)
Delete this resource, return true if successful, false if not.
|
protected List<Resource<?>> |
doListResources()
Strategy method for returning child resources.
|
boolean |
exists()
Return true if this
Resource exists, return false if not. |
Resource<?> |
getChild(String name)
Get a child of this resource.
|
String |
getName()
Return the common name of the resource.
|
InputStream |
getResourceInputStream()
Get the
InputStream represented by this Resource. |
URL |
getUnderlyingResourceObject()
Get the underlying object represented by this
Resource |
equals, getFlags, getFullyQualifiedName, getParent, getResourceFactory, hashCode, isFlagSet, listResources, listResources, reify, setFlag, unsetFlagpublic URLResource(ResourceFactory factory, URL url)
public boolean delete()
throws UnsupportedOperationException
ResourceUnsupportedOperationException - if deleting is not supported by the underlying implementation.public boolean delete(boolean recursive)
throws UnsupportedOperationException
Resourcerecursive - if false and this resource both supports recursive deletion and contains children, deletion will
not occur; otherwise, if true, deletion will propagate to all child resources. Implementations may
choose simply to delegate to Resource.delete()UnsupportedOperationException - if deleting is not supported by the underlying implementation.public String getName()
Resourcepublic Resource<URL> createFrom(URL url)
Resourceurl - The target reference to create the resource instance from.public URL getUnderlyingResourceObject()
ResourceResourcepublic InputStream getResourceInputStream()
ResourceInputStream represented by this Resource.public Resource<?> getChild(String name)
Resourcepublic boolean exists()
ResourceResource exists, return false if not.protected List<Resource<?>> doListResources()
AbstractResourcedoListResources in class AbstractResource<URL>Copyright © 2013 JBoss by Red Hat. All Rights Reserved.