Package org.ametys.core.cocoon.source
Class ResourceSource
java.lang.Object
org.apache.excalibur.source.impl.AbstractSource
org.ametys.core.cocoon.source.ResourceSource
- All Implemented Interfaces:
 Source
Description of a source which is described by the resource protocol which
 gets a resource from the classloader.
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleanexists()protected voidgetInfos()Return anInputStreamobject to read from the source.Get the location of the resourceReturnsNOPValidity.SHARED_INSTANCEsince a resource doesn't change.Methods inherited from class org.apache.excalibur.source.impl.AbstractSource
checkInfos, getContentLength, getLastModified, getScheme, getURI, refresh, setContentLength, setLastModified, setScheme, setSystemId 
- 
Constructor Details
- 
ResourceSource
Constructor.- Parameters:
 systemId- URI of the desired resource- Throws:
 MalformedURLException- if the systemId is not like <scheme>://<path>SourceNotFoundException- if the location can not be found in the class loader
 
 - 
 - 
Method Details
- 
exists
 - 
getInfos
- Overrides:
 getInfosin classAbstractSource
 - 
getMimeType
- Specified by:
 getMimeTypein interfaceSource- Overrides:
 getMimeTypein classAbstractSource
 - 
getInputStream
Return anInputStreamobject to read from the source.- Specified by:
 getInputStreamin interfaceSource- Overrides:
 getInputStreamin classAbstractSource- Throws:
 IOException
 - 
getValidity
ReturnsNOPValidity.SHARED_INSTANCEsince a resource doesn't change.- Specified by:
 getValidityin interfaceSource- Overrides:
 getValidityin classAbstractSource
 - 
getLocation
Get the location of the resource- Returns:
 - The location
 
 
 -