public class DataSourceFileResolver extends DataSourceBaseResolver
DataSource
based on an URL. The implementation
also resolves file resources.Constructor and Description |
---|
DataSourceFileResolver()
Constructor.
|
DataSourceFileResolver(java.io.File baseDir)
Constructor.
|
DataSourceFileResolver(java.io.File baseDir,
boolean lenient)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.io.File |
getBaseDir()
Get the base directory used for resolving relative resource locations.
|
javax.activation.DataSource |
resolve(java.lang.String resourceLocation)
Resolves the given resource location to a
DataSource . |
javax.activation.DataSource |
resolve(java.lang.String resourceLocation,
boolean isLenient)
Resolves the given resource location to a
DataSource . |
isLenient
public DataSourceFileResolver()
public DataSourceFileResolver(java.io.File baseDir)
baseDir
- the base directory of the resource when resolving relative pathspublic DataSourceFileResolver(java.io.File baseDir, boolean lenient)
baseDir
- the base directory of the resource when resolving relative pathslenient
- shall we ignore resources not found or complain with an exceptionpublic java.io.File getBaseDir()
public javax.activation.DataSource resolve(java.lang.String resourceLocation) throws java.io.IOException
DataSource
.resourceLocation
- the location of the resourceDataSource
java.io.IOException
- the resource was not foundpublic javax.activation.DataSource resolve(java.lang.String resourceLocation, boolean isLenient) throws java.io.IOException
DataSource
.resourceLocation
- the location of the resourceisLenient
- shall we ignore resources not found or complain with an exception?java.io.IOException
- resolving the resource failed"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"