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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringgetBasePath(String path) abstract StringgetFileName(String path) abstract InputStreamgetInputStream(URL url) getInputStream(URL url, URLConnectionOptions urlConnectionOptions) Not abstract for binary compatibility.Gets the logger used by this FileSystem.abstract OutputStreamgetOutputStream(File file) abstract OutputStreamgetOutputStream(URL url) abstract Stringabstract URLabstract URLlocateFromURL(String basePath, String fileName) voidsetFileOptionsProvider(FileOptionsProvider provider) Sets the FileOptionsProvidervoidAllows 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
-