public abstract class AbstractBrowsableResourceProxy extends AbstractDataResourceProxy implements BrowsableResource
BrowsableResource
interface that delegates to another
BrowsableResource
.Constructor and Description |
---|
AbstractBrowsableResourceProxy()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
Iterable<BrowsableResource> |
getChildResources()
This method iterates the immediate child-
resources contained in this
BrowsableResource . |
Iterable<BrowsableResource> |
getChildResources(Filter<BrowsableResource> filter)
This method iterates the immediate child-
resources contained in this
BrowsableResource and are accepted by the given filter
. |
protected abstract BrowsableResource |
getDelegate()
This method gets the
DataResource this proxy delegates to. |
boolean |
isFolder()
This method determines if this
BrowsableResource is a folder that potentially contains
other resources . |
OutputStream |
openOutputStream()
This method opens an output-stream in order to write data to the resource.
|
getLastModificationDate, getName, getPath, getSize, getUri, getUrl, isAvailable, isData, isModifiedSince, navigate, openStream, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getLastModificationDate, getName, getPath, getSize, getUri, getUrl, isAvailable, isData, isModifiedSince, navigate, openStream
public AbstractBrowsableResourceProxy()
protected abstract BrowsableResource getDelegate()
DataResource
this proxy delegates to.getDelegate
in class AbstractDataResourceProxy
public Iterable<BrowsableResource> getChildResources()
resources
contained in this
BrowsableResource
. folder
, this method will always return an empty Iterable
.getChildResources
in interface BrowsableResource
Iterable
of the child-resources
.public Iterable<BrowsableResource> getChildResources(Filter<BrowsableResource> filter)
resources
contained in this
BrowsableResource
and are accepted
by the given filter
. getChildResources
in interface BrowsableResource
filter
- is the Filter
applied to the child-resources
.Iterable
of the child-resources
.public boolean isFolder()
BrowsableResource
is a folder that potentially contains
other resources
. Otherwise if this is no folder, BrowsableResource.getChildResources()
will be empty (return an empty Iterable
). However BrowsableResource.getChildResources()
can also be empty,
if this is a folder. BrowsableResource
is containing data
, please
use DataResource.isAvailable()
. Please note that BrowsableResource.isFolder()
and DataResource.isAvailable()
can both
return true
or both return false
.isFolder
in interface BrowsableResource
true
if this is a folder, false
otherwise.public OutputStream openOutputStream() throws ResourceNotWritableException
openOutputStream
in interface DataResource
openOutputStream
in class AbstractDataResourceProxy
OutputStream
to write to the resource.ResourceNotWritableException
- if the resource is NOT writable (e.g. read-only).Copyright © 2001–2014 mmm-Team. All rights reserved.