Class DefaultFileSystem
- java.lang.Object
-
- org.apache.commons.configuration2.io.FileSystem
-
- org.apache.commons.configuration2.io.DefaultFileSystem
-
- Direct Known Subclasses:
VFSFileSystem
public class DefaultFileSystem extends FileSystem
FileSystem that uses java.io.File or HttpClient.- Since:
- 1.7
-
-
Constructor Summary
Constructors Constructor Description DefaultFileSystem()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBasePath(String path)
String
getFileName(String path)
InputStream
getInputStream(URL url)
InputStream
getInputStream(URL url, URLConnectionOptions urlConnectionOptions)
Not abstract for binary compatibility.OutputStream
getOutputStream(File file)
OutputStream
getOutputStream(URL url)
String
getPath(File file, URL url, String basePath, String fileName)
URL
getURL(String basePath, String file)
URL
locateFromURL(String basePath, String fileName)
-
Methods inherited from class org.apache.commons.configuration2.io.FileSystem
getFileOptionsProvider, getLogger, setFileOptionsProvider, setLogger
-
-
-
-
Constructor Detail
-
DefaultFileSystem
public DefaultFileSystem()
-
-
Method Detail
-
getInputStream
public InputStream getInputStream(URL url) throws ConfigurationException
- Specified by:
getInputStream
in classFileSystem
- Throws:
ConfigurationException
-
getInputStream
public InputStream getInputStream(URL url, URLConnectionOptions urlConnectionOptions) throws ConfigurationException
Description copied from class:FileSystem
Not abstract for binary compatibility.- Overrides:
getInputStream
in classFileSystem
- Parameters:
url
- TODOurlConnectionOptions
- Ignored.- Returns:
- TODO
- Throws:
ConfigurationException
- TODO
-
getOutputStream
public OutputStream getOutputStream(URL url) throws ConfigurationException
- Specified by:
getOutputStream
in classFileSystem
- Throws:
ConfigurationException
-
getOutputStream
public OutputStream getOutputStream(File file) throws ConfigurationException
- Specified by:
getOutputStream
in classFileSystem
- Throws:
ConfigurationException
-
getPath
public String getPath(File file, URL url, String basePath, String fileName)
- Specified by:
getPath
in classFileSystem
-
getBasePath
public String getBasePath(String path)
- Specified by:
getBasePath
in classFileSystem
-
getFileName
public String getFileName(String path)
- Specified by:
getFileName
in classFileSystem
-
getURL
public URL getURL(String basePath, String file) throws MalformedURLException
- Specified by:
getURL
in classFileSystem
- Throws:
MalformedURLException
-
locateFromURL
public URL locateFromURL(String basePath, String fileName)
- Specified by:
locateFromURL
in classFileSystem
-
-