public abstract class AbstractDataResource extends Object implements DataResource
DataResource interface.| Constructor and Description |
|---|
AbstractDataResource()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
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. |
int |
hashCode() |
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() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetLastModificationDate, getUrl, isData, navigatepublic 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()
DataResourcename of
the resource. getPath in interface DataResourcepublic String getUri()
DataResourceDataResource. 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()
DataResourcedata 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)
DataResourcedata.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
DataResourceopenOutputStream 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()
DataResourcefilename.getName in interface DataResourceCopyright © 2001–2016 mmm-Team. All rights reserved.