public class FileSourceFactory extends java.lang.Object implements SourceFactory, org.apache.avalon.framework.thread.ThreadSafe, URIAbsolutizer
FileSource).ROLE| Constructor and Description |
|---|
FileSourceFactory() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
absolutize(java.lang.String baseURI,
java.lang.String location) |
Source |
getSource(java.lang.String location,
java.util.Map parameters)
Get a
Source object. |
void |
release(Source source)
Does nothing, since
FileSources don't need to be released. |
public Source getSource(java.lang.String location, java.util.Map parameters) throws java.io.IOException, java.net.MalformedURLException
SourceFactorySource object.
The factory creates a new Source object that can be used
by the application. However, when this source object is not needed
anymore it has to be released again using the SourceFactory.release(Source)
method. This is achieved by using SourceResolver.release(Source) which
finds the appropriate SourceFactory.getSource in interface SourceFactorylocation - The URI to resolve - this URI includes the scheme.parameters - additionnal named parameters (optionnal and can be null)
that drive the creation of the Source object. Each implementation
must specify what parameters it accepts.java.io.IOException - if the source couldn't be created for some reason.java.net.MalformedURLExceptionSourceFactory.getSource(java.lang.String, java.util.Map)public void release(Source source)
FileSources don't need to be released.release in interface SourceFactorysource - the source to release.SourceFactory.release(org.apache.excalibur.source.Source)public java.lang.String absolutize(java.lang.String baseURI,
java.lang.String location)
absolutize in interface URIAbsolutizer