Package org.apache.commons.vfs.provider
Class AbstractLayeredFileProvider
- java.lang.Object
-
- org.apache.commons.vfs.provider.AbstractVfsComponent
-
- org.apache.commons.vfs.provider.AbstractVfsContainer
-
- org.apache.commons.vfs.provider.AbstractFileProvider
-
- org.apache.commons.vfs.provider.AbstractLayeredFileProvider
-
- All Implemented Interfaces:
FileProvider
,VfsComponent
- Direct Known Subclasses:
CompressedFileFileProvider
,TarFileProvider
,ZipFileProvider
public abstract class AbstractLayeredFileProvider extends AbstractFileProvider implements FileProvider
AFileProvider
that is layered on top of another, such as the contents of a zip or tar file.- Version:
- $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Wed, 29 Nov 2006) $
- Author:
- Adam Murdoch
-
-
Constructor Summary
Constructors Constructor Description AbstractLayeredFileProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description FileObject
createFileSystem(java.lang.String scheme, FileObject file, FileSystemOptions fileSystemOptions)
Creates a layered file system.protected abstract FileSystem
doCreateFileSystem(java.lang.String scheme, FileObject file, FileSystemOptions fileSystemOptions)
Creates a layered file system.FileObject
findFile(FileObject baseFile, java.lang.String uri, FileSystemOptions properties)
Locates a file object, by absolute URI.-
Methods inherited from class org.apache.commons.vfs.provider.AbstractFileProvider
addFileSystem, close, closeFileSystem, findFileSystem, freeUnusedResources, getConfigBuilder, getFileNameParser, parseUri, setFileNameParser
-
Methods inherited from class org.apache.commons.vfs.provider.AbstractVfsContainer
addComponent, removeComponent
-
Methods inherited from class org.apache.commons.vfs.provider.AbstractVfsComponent
getContext, getLogger, init, setContext, setLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.commons.vfs.provider.FileProvider
getCapabilities, getConfigBuilder, parseUri
-
-
-
-
Method Detail
-
findFile
public FileObject findFile(FileObject baseFile, java.lang.String uri, FileSystemOptions properties) throws FileSystemException
Locates a file object, by absolute URI.- Specified by:
findFile
in interfaceFileProvider
- Parameters:
baseFile
- The base file to use for resolving the individual parts of a compound URI.uri
- The absolute URI of the file to find.- Throws:
FileSystemException
-
createFileSystem
public FileObject createFileSystem(java.lang.String scheme, FileObject file, FileSystemOptions fileSystemOptions) throws FileSystemException
Creates a layered file system.- Specified by:
createFileSystem
in interfaceFileProvider
- Overrides:
createFileSystem
in classAbstractFileProvider
- Parameters:
scheme
- The URI scheme for the layered file system.file
- The file to build the file system on.- Throws:
FileSystemException
-
doCreateFileSystem
protected abstract FileSystem doCreateFileSystem(java.lang.String scheme, FileObject file, FileSystemOptions fileSystemOptions) throws FileSystemException
Creates a layered file system. This method is called if the file system is not cached. The file system may implementVfsComponent
.- Parameters:
scheme
- The URI scheme.file
- The file to create the file system on top of.- Returns:
- The file system.
- Throws:
FileSystemException
-
-