org.apache.commons.configuration
Class DefaultFileSystem

java.lang.Object
  extended by org.apache.commons.configuration.FileSystem
      extended by org.apache.commons.configuration.DefaultFileSystem
Direct Known Subclasses:
VFSFileSystem

public class DefaultFileSystem
extends FileSystem

FileSystem that uses java.io.File or HttpClient

Since:
1.7
Author:
Commons Configuration team

Constructor Summary
DefaultFileSystem()
           
 
Method Summary
 String getBasePath(String path)
           
 String getFileName(String path)
           
 InputStream getInputStream(String basePath, String fileName)
           
 InputStream getInputStream(URL url)
           
 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.configuration.FileSystem
getDefaultFileSystem, getFileOptionsProvider, getLogger, resetDefaultFileSystem, setDefaultFileSystem, setFileOptionsProvider, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFileSystem

public DefaultFileSystem()
Method Detail

getInputStream

public InputStream getInputStream(String basePath,
                                  String fileName)
                           throws ConfigurationException
Specified by:
getInputStream in class FileSystem
Throws:
ConfigurationException

getInputStream

public InputStream getInputStream(URL url)
                           throws ConfigurationException
Specified by:
getInputStream in class FileSystem
Throws:
ConfigurationException

getOutputStream

public OutputStream getOutputStream(URL url)
                             throws ConfigurationException
Specified by:
getOutputStream in class FileSystem
Throws:
ConfigurationException

getOutputStream

public OutputStream getOutputStream(File file)
                             throws ConfigurationException
Specified by:
getOutputStream in class FileSystem
Throws:
ConfigurationException

getPath

public String getPath(File file,
                      URL url,
                      String basePath,
                      String fileName)
Specified by:
getPath in class FileSystem

getBasePath

public String getBasePath(String path)
Specified by:
getBasePath in class FileSystem

getFileName

public String getFileName(String path)
Specified by:
getFileName in class FileSystem

getURL

public URL getURL(String basePath,
                  String file)
           throws MalformedURLException
Specified by:
getURL in class FileSystem
Throws:
MalformedURLException

locateFromURL

public URL locateFromURL(String basePath,
                         String fileName)
Specified by:
locateFromURL in class FileSystem


Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.