Class FileSystem
java.lang.Object
org.apache.commons.configuration2.io.FileSystem
- Direct Known Subclasses:
DefaultFileSystem
Abstract layer to allow various types of file systems.
- Since:
- 1.7
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract String
getBasePath
(String path) abstract String
getFileName
(String path) abstract InputStream
getInputStream
(URL url) getInputStream
(URL url, URLConnectionOptions urlConnectionOptions) Not abstract for binary compatibility.Gets the logger used by this FileSystem.abstract OutputStream
getOutputStream
(File file) abstract OutputStream
getOutputStream
(URL url) abstract String
abstract URL
abstract URL
locateFromURL
(String basePath, String fileName) void
setFileOptionsProvider
(FileOptionsProvider provider) Sets the FileOptionsProvidervoid
Allows setting the logger to be used by this FileSystem.
-
Constructor Details
-
FileSystem
public FileSystem()
-
-
Method Details
-
getBasePath
-
getFileName
-
getFileOptionsProvider
-
getInputStream
- Throws:
ConfigurationException
-
getInputStream
public InputStream getInputStream(URL url, URLConnectionOptions urlConnectionOptions) throws ConfigurationException Not abstract for binary compatibility.- Parameters:
url
- TODOurlConnectionOptions
- Ignored.- Returns:
- TODO
- Throws:
ConfigurationException
- TODO- Since:
- 2.8.0
-
getLogger
Gets the logger used by this FileSystem.- Returns:
- the logger
-
getOutputStream
- Throws:
ConfigurationException
-
getOutputStream
- Throws:
ConfigurationException
-
getPath
-
getURL
- Throws:
MalformedURLException
-
locateFromURL
-
setFileOptionsProvider
Sets the FileOptionsProvider- Parameters:
provider
- The FileOptionsProvider
-
setLogger
Allows setting the logger to be used by this FileSystem. This method makes it possible for clients to exactly control logging behavior. Per default a logger is set that will ignore all log messages. Derived classes that want to enable logging should call this method during their initialization with the logger to be used. Passing in a null argument disables logging.- Parameters:
log
- the new logger
-