org.apache.excalibur.source.impl
Class ResourceSource
java.lang.Object
org.apache.excalibur.source.impl.AbstractSource
org.apache.excalibur.source.impl.ResourceSource
- All Implemented Interfaces:
- Source
- public final class ResourceSource
- extends AbstractSource
- implements Source
Description of a source which is described by the resource protocol which gets a resource from the classloader.
- Version:
- CVS $Revision: 1.4 $ $Date: 2004/02/28 11:47:24 $
- Author:
| Field Summary |
private java.net.URL |
m_location
Location of the resource |
private java.lang.String |
m_mimeType
|
| Fields inherited from class org.apache.excalibur.source.impl.AbstractSource |
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_location
private java.net.URL m_location
-
Location of the resource
m_mimeType
private java.lang.String m_mimeType
-
ResourceSource
public ResourceSource(java.lang.String systemId)
throws java.net.MalformedURLException
exists
public boolean exists()
- Description copied from interface:
Source
-
Does this source exist ?
-
- Specified by:
exists in interface Source
-
- Returns:
- true if the source exists
checkInfos
protected void checkInfos()
-
- Overrides:
checkInfos in class AbstractSource
-
getMimeType
public java.lang.String getMimeType()
- Description copied from interface:
Source
-
Get the mime-type of the content described by this object. If the source is not able to determine the mime-type by itself this can be
null.
-
- Specified by:
getMimeType in interface Source
- Overrides:
getMimeType in class AbstractSource
-
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException,
SourceException
-
Return an
InputStream object to read from the source.
-
- Specified by:
getInputStream in interface Source
- Overrides:
getInputStream in class AbstractSource
-
- Throws:
SourceException - if file not found or HTTP location does not exist.
java.io.IOException - if I/O error occured.
getValidity
public SourceValidity getValidity()
-
Returns
NOPValidity.SHARED_INSTANCE since a resource doesn't change.
-
- Specified by:
getValidity in interface Source
- Overrides:
getValidity in class AbstractSource
-
getClassLoader
protected java.lang.ClassLoader getClassLoader()
-
-
Please see keelframework.org for information about new Keel releases.