Package org.apache.commons.vfs.provider
Class AbstractFileProvider
java.lang.Object
org.apache.commons.vfs.provider.AbstractVfsComponent
org.apache.commons.vfs.provider.AbstractVfsContainer
org.apache.commons.vfs.provider.AbstractFileProvider
- All Implemented Interfaces:
FileProvider,VfsComponent
- Direct Known Subclasses:
AbstractLayeredFileProvider,AbstractOriginatingFileProvider,CompositeFileProvider,ResourceFileProvider,TemporaryFileProvider,UrlFileProvider
A partial
FileProvider implementation. Takes care of managing the
file systems created by the provider.- Version:
- $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Wed, 29 Nov 2006) $
- Author:
- Adam Murdoch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddFileSystem(Comparable key, FileSystem fs) Adds a file system to those cached by this provider.voidclose()Closes the file systems created by this provider.voidcloseFileSystem(FileSystem filesystem) createFileSystem(String scheme, FileObject file, FileSystemOptions properties) Creates a layered file system.protected FileSystemfindFileSystem(Comparable key, FileSystemOptions fileSystemProps) Locates a cached file systemvoidGets the configbuilder useable to collect the needed fileSystemOptions.protected FileNameParserParses an absolute URI.protected voidsetFileNameParser(FileNameParser parser) Methods inherited from class org.apache.commons.vfs.provider.AbstractVfsContainer
addComponent, removeComponentMethods inherited from class org.apache.commons.vfs.provider.AbstractVfsComponent
getContext, getLogger, init, setContext, setLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.commons.vfs.provider.FileProvider
findFile, getCapabilities
-
Constructor Details
-
AbstractFileProvider
public AbstractFileProvider()
-
-
Method Details
-
getFileNameParser
-
setFileNameParser
-
close
public void close()Closes the file systems created by this provider.- Specified by:
closein interfaceVfsComponent- Overrides:
closein classAbstractVfsContainer
-
createFileSystem
public FileObject createFileSystem(String scheme, FileObject file, FileSystemOptions properties) throws FileSystemException Creates a layered file system. This method throws a 'not supported' exception.- Specified by:
createFileSystemin interfaceFileProvider- Parameters:
scheme- The URI scheme for the layered file system.file- The file to build the file system on.properties-- Throws:
FileSystemException
-
addFileSystem
Adds a file system to those cached by this provider. The file system may implementVfsComponent, in which case it is initialised.- Throws:
FileSystemException
-
findFileSystem
Locates a cached file system- Returns:
- The provider, or null if it is not cached.
-
getConfigBuilder
Description copied from interface:FileProviderGets the configbuilder useable to collect the needed fileSystemOptions.- Specified by:
getConfigBuilderin interfaceFileProvider
-
freeUnusedResources
public void freeUnusedResources() -
closeFileSystem
-
parseUri
Parses an absolute URI.- Specified by:
parseUriin interfaceFileProvider- Parameters:
base- The base file - if null theurineeds to be absoluteuri- The URI to parse.- Throws:
FileSystemException
-