public class ResourceLoaderFileSystem extends Object implements FileSystem, org.springframework.context.ResourceLoaderAware
CLASSPATH_PROTOCOL, FILE_PROTOCOL, FILE_PROTOCOL_ABSOLUTE, FILE_PROTOCOL_AND_CONF, FILE_PROTOCOL_AND_VAR
Constructor and Description |
---|
ResourceLoaderFileSystem() |
Modifier and Type | Method and Description |
---|---|
File |
getBasedir()
Return the base folder used by the application
|
File |
getFile(String fileURL)
Used to retrieve a specific file in the application context
|
InputStream |
getResource(String url)
to retrieve a resource.
|
void |
setResourceLoader(org.springframework.core.io.ResourceLoader loader) |
public InputStream getResource(String url) throws IOException
FileSystem
getResource
in interface FileSystem
url
- the url of the resourceIOException
- if the resource could not be accessedpublic File getFile(String fileURL) throws FileNotFoundException
FileSystem
getFile
in interface FileSystem
fileURL
- fileFileNotFoundException
- if the file cannot be found/readpublic File getBasedir() throws FileNotFoundException
FileSystem
getBasedir
in interface FileSystem
FileNotFoundException
public void setResourceLoader(org.springframework.core.io.ResourceLoader loader)
setResourceLoader
in interface org.springframework.context.ResourceLoaderAware
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.