Class VFSFileSystem
- java.lang.Object
-
- org.apache.commons.configuration2.io.FileSystem
-
- org.apache.commons.configuration2.io.DefaultFileSystem
-
- org.apache.commons.configuration2.io.VFSFileSystem
-
public class VFSFileSystem extends DefaultFileSystem
FileSystem that uses Apache Commons VFS.- Since:
- 1.7
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
VFSFileSystem.VFSURLStreamHandler
Stream handler required to create URL.
-
Field Summary
Fields Modifier and Type Field Description private org.apache.commons.logging.Log
log
The logger.
-
Constructor Summary
Constructors Constructor Description VFSFileSystem()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getBasePath(java.lang.String path)
java.lang.String
getFileName(java.lang.String path)
java.io.InputStream
getInputStream(java.net.URL url)
private org.apache.commons.vfs2.FileSystemManager
getManager()
private org.apache.commons.vfs2.FileSystemOptions
getOptions(java.lang.String scheme)
java.io.OutputStream
getOutputStream(java.net.URL url)
java.lang.String
getPath(java.io.File file, java.net.URL url, java.lang.String basePath, java.lang.String fileName)
java.net.URL
getURL(java.lang.String basePath, java.lang.String file)
java.net.URL
locateFromURL(java.lang.String basePath, java.lang.String fileName)
private org.apache.commons.vfs2.FileName
resolveURI(java.lang.String path)
private void
setProperty(org.apache.commons.vfs2.FileSystemConfigBuilder builder, org.apache.commons.vfs2.FileSystemOptions options, java.lang.String key, java.lang.Object value)
-
Methods inherited from class org.apache.commons.configuration2.io.DefaultFileSystem
getInputStream, getOutputStream
-
Methods inherited from class org.apache.commons.configuration2.io.FileSystem
getFileOptionsProvider, getLogger, setFileOptionsProvider, setLogger
-
-
-
-
Method Detail
-
getBasePath
public java.lang.String getBasePath(java.lang.String path)
- Overrides:
getBasePath
in classDefaultFileSystem
-
getFileName
public java.lang.String getFileName(java.lang.String path)
- Overrides:
getFileName
in classDefaultFileSystem
-
getInputStream
public java.io.InputStream getInputStream(java.net.URL url) throws ConfigurationException
- Overrides:
getInputStream
in classDefaultFileSystem
- Throws:
ConfigurationException
-
getManager
private org.apache.commons.vfs2.FileSystemManager getManager() throws org.apache.commons.vfs2.FileSystemException
- Throws:
org.apache.commons.vfs2.FileSystemException
-
getOptions
private org.apache.commons.vfs2.FileSystemOptions getOptions(java.lang.String scheme)
-
getOutputStream
public java.io.OutputStream getOutputStream(java.net.URL url) throws ConfigurationException
- Overrides:
getOutputStream
in classDefaultFileSystem
- Throws:
ConfigurationException
-
getPath
public java.lang.String getPath(java.io.File file, java.net.URL url, java.lang.String basePath, java.lang.String fileName)
- Overrides:
getPath
in classDefaultFileSystem
-
getURL
public java.net.URL getURL(java.lang.String basePath, java.lang.String file) throws java.net.MalformedURLException
- Overrides:
getURL
in classDefaultFileSystem
- Throws:
java.net.MalformedURLException
-
locateFromURL
public java.net.URL locateFromURL(java.lang.String basePath, java.lang.String fileName)
- Overrides:
locateFromURL
in classDefaultFileSystem
-
resolveURI
private org.apache.commons.vfs2.FileName resolveURI(java.lang.String path) throws org.apache.commons.vfs2.FileSystemException
- Throws:
org.apache.commons.vfs2.FileSystemException
-
setProperty
private void setProperty(org.apache.commons.vfs2.FileSystemConfigBuilder builder, org.apache.commons.vfs2.FileSystemOptions options, java.lang.String key, java.lang.Object value)
-
-