public abstract class FileSystem extends Object
Constructor and Description |
---|
FileSystem() |
Modifier and Type | Method and Description |
---|---|
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.
|
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 FileSystemNullPointerException
- 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 URL getURL(String basePath, String fileName) throws MalformedURLException
MalformedURLException
Copyright © 2001–2013 The Apache Software Foundation. All rights reserved.