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 |
---|---|
BrowsableResource |
cd(String path)
|
Iterable<? extends BrowsableResource> |
getChildResources()
This method iterates the immediate child-
resources contained in this
BrowsableResource . |
Iterable<? extends BrowsableResource> |
getChildResources(Filter<? super 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()
AbstractDataResourceProxy
DataResource
this proxy delegates to.getDelegate
in class AbstractDataResourceProxy
public Iterable<? extends BrowsableResource> getChildResources()
BrowsableResource
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<? extends BrowsableResource> getChildResources(Filter<? super BrowsableResource> filter)
BrowsableResource
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
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 BrowsableResource cd(String path)
BrowsableResource
cd
in interface BrowsableResource
path
- the absolute or relative path pointing to a new resource. If it is a relative path, it is interpreted
relative to the current URI (directory) if this is a folder
and relative to the parent
URI otherwise.DataResource.navigate(String)
public OutputStream openOutputStream() throws ResourceNotWritableException
DataResource
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–2016 mmm-Team. All rights reserved.