|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.configuration.FileSystem
public abstract class FileSystem
Abstract layer to allow various types of file systems.
Constructor Summary | |
---|---|
FileSystem()
|
Method Summary | |
---|---|
abstract String |
getBasePath(String path)
|
static FileSystem |
getDefaultFileSystem()
Retrieve the FileSystem being used. |
abstract String |
getFileName(String path)
|
FileOptionsProvider |
getFileOptionsProvider()
|
abstract InputStream |
getInputStream(String basePath,
String fileName)
|
abstract InputStream |
getInputStream(URL url)
|
org.apache.commons.logging.Log |
getLogger()
Returns the logger used by this FileSystem. |
abstract OutputStream |
getOutputStream(File file)
|
abstract OutputStream |
getOutputStream(URL url)
|
abstract String |
getPath(File file,
URL url,
String basePath,
String fileName)
|
abstract URL |
getURL(String basePath,
String fileName)
|
abstract URL |
locateFromURL(String basePath,
String fileName)
|
static void |
resetDefaultFileSystem()
Reset the FileSystem to the default. |
static void |
setDefaultFileSystem(FileSystem fs)
Set the FileSystem to use. |
void |
setFileOptionsProvider(FileOptionsProvider provider)
Set the FileOptionsProvider |
void |
setLogger(org.apache.commons.logging.Log log)
Allows to set the logger to be used by this FileSystem. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileSystem()
Method Detail |
---|
public org.apache.commons.logging.Log getLogger()
public void setLogger(org.apache.commons.logging.Log log)
log
- the new loggerpublic static void setDefaultFileSystem(FileSystem fs) throws NullPointerException
fs
- The FileSystem
NullPointerException
- if the FileSystem parameter is null.public static void resetDefaultFileSystem()
public static FileSystem getDefaultFileSystem()
public void setFileOptionsProvider(FileOptionsProvider provider)
provider
- The FileOptionsProviderpublic FileOptionsProvider getFileOptionsProvider()
public abstract InputStream getInputStream(String basePath, String fileName) throws ConfigurationException
ConfigurationException
public abstract InputStream getInputStream(URL url) throws ConfigurationException
ConfigurationException
public abstract OutputStream getOutputStream(URL url) throws ConfigurationException
ConfigurationException
public abstract OutputStream getOutputStream(File file) throws ConfigurationException
ConfigurationException
public abstract String getPath(File file, URL url, String basePath, String fileName)
public abstract String getBasePath(String path)
public abstract String getFileName(String path)
public abstract URL locateFromURL(String basePath, String fileName)
public abstract URL getURL(String basePath, String fileName) throws MalformedURLException
MalformedURLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |