|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.excalibur.source.impl.AbstractSource
org.apache.excalibur.source.impl.ResourceSource
public final class ResourceSource
Description of a source which is described by the resource protocol which gets a resource from the classloader.
Constructor Summary | |
---|---|
ResourceSource(java.lang.String systemId)
|
Method Summary | |
---|---|
boolean |
exists()
Does this source exist ? |
protected java.lang.ClassLoader |
getClassLoader()
|
protected void |
getInfos()
Get the last modification date and content length of the source. |
java.io.InputStream |
getInputStream()
Return an InputStream object to read from the source. |
java.lang.String |
getMimeType()
The mime-type of the content described by this object. |
SourceValidity |
getValidity()
Returns TimeStampValidity as resources may change in a directory-based classloader. |
Methods inherited from class org.apache.excalibur.source.impl.AbstractSource |
---|
checkInfos, getContentLength, getLastModified, getScheme, getURI, refresh, setContentLength, setLastModified, setScheme, setSystemId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.excalibur.source.Source |
---|
getContentLength, getLastModified, getScheme, getURI, refresh |
Constructor Detail |
---|
public ResourceSource(java.lang.String systemId) throws java.net.MalformedURLException
java.net.MalformedURLException
Method Detail |
---|
public boolean exists()
Source
exists
in interface Source
protected void getInfos()
AbstractSource
getInfos
in class AbstractSource
public java.lang.String getMimeType()
AbstractSource
getMimeType
in interface Source
getMimeType
in class AbstractSource
null
.public java.io.InputStream getInputStream() throws java.io.IOException, SourceException
InputStream
object to read from the source.
The returned stream must be closed by the calling code.
getInputStream
in interface Source
getInputStream
in class AbstractSource
InputStream
to read data from (never null
).
SourceException
- if file not found or
HTTP location does not exist.
java.io.IOException
- if I/O error occured.public SourceValidity getValidity()
TimeStampValidity
as resources may change in a directory-based classloader.
getValidity
in interface Source
getValidity
in class AbstractSource
null
.protected java.lang.ClassLoader getClassLoader()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |