public class FileSystemImpl extends Object implements FileSystem, org.springframework.context.ApplicationContextAware
FileSystem
implementation which use the JamesResourceLoader
to load all needed resourcesCLASSPATH_PROTOCOL, FILE_PROTOCOL, FILE_PROTOCOL_ABSOLUTE, FILE_PROTOCOL_AND_CONF, FILE_PROTOCOL_AND_VAR
Constructor and Description |
---|
FileSystemImpl() |
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 |
setApplicationContext(org.springframework.context.ApplicationContext context) |
public File getBasedir() throws FileNotFoundException
FileSystem
getBasedir
in interface FileSystem
FileNotFoundException
FileSystem.getBasedir()
public InputStream getResource(String url) throws IOException
FileSystem
getResource
in interface FileSystem
url
- the url of the resourceIOException
- if the resource could not be accessedFileSystem.getResource(String)
public File getFile(String fileURL) throws FileNotFoundException
FileSystem
getFile
in interface FileSystem
fileURL
- fileFileNotFoundException
- if the file cannot be found/readFileSystem.getFile(String)
public void setApplicationContext(org.springframework.context.ApplicationContext context) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
(org.springframework.context.ApplicationContext)
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.