public class DataSourceFileResolver extends DataSourceBaseResolver
DataSource
based on an URL. The implementation
also resolves file resources.Constructor and Description |
---|
DataSourceFileResolver()
Constructor.
|
DataSourceFileResolver(File baseDir)
Constructor.
|
DataSourceFileResolver(File baseDir,
boolean lenient)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
File |
getBaseDir()
Get the base directory used for resolving relative resource locations.
|
DataSource |
resolve(String resourceLocation)
Resolves the given resource location to a
DataSource . |
DataSource |
resolve(String resourceLocation,
boolean isLenient)
Resolves the given resource location to a
DataSource . |
isCid, isFileUrl, isHttpUrl, isLenient
public DataSourceFileResolver()
public DataSourceFileResolver(File baseDir)
baseDir
- the base directory of the resource when resolving relative pathspublic DataSourceFileResolver(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 File getBaseDir()
public DataSource resolve(String resourceLocation) throws IOException
DataSource
.resourceLocation
- the location of the resourceDataSource
IOException
- the resource was not foundpublic DataSource resolve(String resourceLocation, boolean isLenient) throws IOException
DataSource
.resourceLocation
- the location of the resourceisLenient
- shall we ignore resources not found or complain with an exception?IOException
- resolving the resource failedCopyright © 2001–2017 The Apache Software Foundation. All rights reserved.