|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mmm.util.resource.base.AbstractDataResource
public abstract class AbstractDataResource
This is the abstract base implementation of the DataResource
interface.
| Constructor Summary | |
|---|---|
AbstractDataResource()
The constructor. |
|
| Method Summary | |
|---|---|
String |
getName()
This method gets the name of the resource. |
String |
getPath()
This method gets the path of this resource. |
abstract String |
getSchemePrefix()
This method gets the scheme-prefix of absolute URIs for this type of DataResource. |
long |
getSize()
This method gets the size (content-length) of this resource. |
String |
getUri()
This method gets a string identifying this DataResource. |
boolean |
isAvailable()
This method determines if this resource is available. |
Boolean |
isModifiedSince(Date date)
This method determines if this resource has been been modified since the given data. |
OutputStream |
openOutputStream()
This method opens an output-stream in order to write data to the resource. |
InputStream |
openStream()
This method opens this resource for reading. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.sf.mmm.util.resource.api.DataResource |
|---|
getLastModificationDate, getUrl, isData, navigate |
| Constructor Detail |
|---|
public AbstractDataResource()
| Method Detail |
|---|
public abstract String getSchemePrefix()
URIs for this type of DataResource. The scheme-prefix has the
following form:
<scheme>:<suffix>
where <suffix> is the empty string or something like
//.
public long getSize()
throws ResourceNotAvailableException
getSize in interface DataResourceResourceNotAvailableException - if this resource is NOT
available.public InputStream openStream()
openStream in interface DataResourceURL.openStream()public String getPath()
name of the resource.created.
getPath in interface DataResourcepublic String getUri()
DataResource. In most
cases this will be the same as string-representation of the URL. However this method
will not throw an exception.
getUri in interface DataResourcepublic boolean isAvailable()
data can be read.DataResource.isData() to prevent such expensive operaitons.
isAvailable in interface DataResourcetrue if this resource is available, false
otherwise.public Boolean isModifiedSince(Date date)
data.
isModifiedSince in interface DataResourcedate - is the Date to check for.
true if the resource has been modified after the given
date, false if it has NOT been modified
after the given date and null if this can
NOT be determined (resource not available or
operation NOT supported by this resource).
public OutputStream openOutputStream()
throws ResourceNotAvailableException,
ResourceNotWritableException,
RuntimeIoException
openOutputStream in interface DataResourceOutputStream to write to the resource.
ResourceNotAvailableException - if this resource is NOT
available.
ResourceNotWritableException - if the resource is NOT writable (e.g.
read-only).
RuntimeIoException - if an input/output error occurred.public String getName()
filename.
getName in interface DataResourcepublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||