Package org.apache.commons.vfs2.provider
Class AbstractLayeredFileProvider
java.lang.Object
org.apache.commons.vfs2.provider.AbstractVfsComponent
org.apache.commons.vfs2.provider.AbstractVfsContainer
org.apache.commons.vfs2.provider.AbstractFileProvider
org.apache.commons.vfs2.provider.AbstractLayeredFileProvider
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- FileProvider,- VfsComponent
- Direct Known Subclasses:
- CompressedFileFileProvider,- TarFileProvider,- ZipFileProvider
A 
FileProvider that is layered on top of another, such as the contents of a ZIP or tar file.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncreateFileSystem(String scheme, FileObject file, FileSystemOptions fileSystemOptions) Creates a layered file system.protected abstract FileSystemdoCreateFileSystem(String scheme, FileObject file, FileSystemOptions fileSystemOptions) Creates a layered file system.findFile(FileObject baseFile, String uri, FileSystemOptions fileSystemOptions) Locates a file object, by absolute URI.Methods inherited from class org.apache.commons.vfs2.provider.AbstractFileProvideraddFileSystem, close, closeFileSystem, findFileSystem, freeUnusedResources, getConfigBuilder, getFileNameParser, parseUri, setFileNameParserMethods inherited from class org.apache.commons.vfs2.provider.AbstractVfsContaineraddComponent, removeComponentMethods inherited from class org.apache.commons.vfs2.provider.AbstractVfsComponentgetContext, getLogger, init, setContext, setLoggerMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.commons.vfs2.provider.FileProvidergetCapabilities
- 
Constructor Details- 
AbstractLayeredFileProviderpublic AbstractLayeredFileProvider()Constructs a new instance for subclasses.
 
- 
- 
Method Details- 
createFileSystempublic FileObject createFileSystem(String scheme, FileObject file, FileSystemOptions fileSystemOptions) throws FileSystemException Creates a layered file system.- Specified by:
- createFileSystemin interface- FileProvider
- Overrides:
- createFileSystemin class- AbstractFileProvider
- Parameters:
- scheme- The protocol to use.
- file- a FileObject.
- fileSystemOptions- Options to access the FileSystem.
- Returns:
- A FileObject associated with the new FileSystem.
- Throws:
- FileSystemException- if an error occurs.
 
- 
doCreateFileSystemprotected abstract FileSystem doCreateFileSystem(String scheme, FileObject file, FileSystemOptions fileSystemOptions) throws FileSystemException Creates a layered file system.This method is called if the file system is not cached. - Parameters:
- scheme- The URI scheme.
- file- The file to create the file system on top of.
- fileSystemOptions- options for new and underlying file systems.
- Returns:
- The file system, never null. Might implement VfsComponent.
- Throws:
- FileSystemException- if the file system cannot be created.
 
- 
findFilepublic FileObject findFile(FileObject baseFile, String uri, FileSystemOptions fileSystemOptions) throws FileSystemException Locates a file object, by absolute URI.- Parameters:
- baseFile- The base FileObject.
- uri- The name of the file to locate.
- fileSystemOptions- The FileSystemOptions.
- Returns:
- The FileObject if it is located, null otherwise.
- Throws:
- FileSystemException- if an error occurs.
 
 
-