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:
- FileProvider, VfsComponent
- Direct Known Subclasses:
- CompressedFileFileProvider, TarFileProvider, ZipFileProvider
public abstract class AbstractLayeredFileProvider
- extends AbstractFileProvider
- implements FileProvider
A FileProvider that is layered on top of another, such as the
contents of a zip or tar file.
- Author:
- Commons VFS team
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractLayeredFileProvider
public AbstractLayeredFileProvider()
findFile
public FileObject findFile(FileObject baseFile,
String uri,
FileSystemOptions properties)
throws FileSystemException
- Locates a file object, by absolute URI.
- Specified by:
findFile in interface FileProvider
- Parameters:
baseFile - The base FileObject.uri - The name of the file to locate.properties - The FileSystemOptions.
- Returns:
- The FileObject if it is located, null otherwise.
- Throws:
FileSystemException - if an error occurs.
createFileSystem
public FileObject createFileSystem(String scheme,
FileObject file,
FileSystemOptions fileSystemOptions)
throws FileSystemException
- Creates a layered file system.
- Specified by:
createFileSystem in interface FileProvider- Overrides:
createFileSystem in 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.
doCreateFileSystem
protected 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. The file system may implement
VfsComponent.
- Parameters:
scheme - The URI scheme.file - The file to create the file system on top of.
- Returns:
- The file system.
- Throws:
FileSystemException
Copyright © 2002-2011 The Apache Software Foundation. All Rights Reserved.