Class CompressedFileFileProvider
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
org.apache.commons.vfs2.provider.compressed.CompressedFileFileProvider
- All Implemented Interfaces:
Closeable, AutoCloseable, FileProvider, VfsComponent
- Direct Known Subclasses:
Bzip2FileProvider, GzipFileProvider
A file system provider for compressed files. Provides read-only file systems.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract FileSystemcreateFileSystem(FileName name, FileObject file, FileSystemOptions fileSystemOptions) protected FileSystemdoCreateFileSystem(String scheme, FileObject file, FileSystemOptions fileSystemOptions) Creates a layered file system.abstract Collection<Capability> Gets the file system capabilities.Methods inherited from class AbstractLayeredFileProvider
createFileSystem, findFileMethods inherited from class AbstractFileProvider
addFileSystem, close, closeFileSystem, findFileSystem, freeUnusedResources, getConfigBuilder, getFileNameParser, parseUri, setFileNameParserMethods inherited from class AbstractVfsContainer
addComponent, removeComponentMethods inherited from class AbstractVfsComponent
getContext, getLogger, init, setContext, setLogger
-
Constructor Details
-
CompressedFileFileProvider
public CompressedFileFileProvider()
-
-
Method Details
-
doCreateFileSystem
protected 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.- Specified by:
doCreateFileSystemin classAbstractLayeredFileProvider- 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.
- Throws:
FileSystemException- if the file system cannot be created.
-
createFileSystem
protected abstract FileSystem createFileSystem(FileName name, FileObject file, FileSystemOptions fileSystemOptions) throws FileSystemException - Throws:
FileSystemException
-
getCapabilities
Description copied from interface:FileProviderGets the file system capabilities.These are the same as on the file system, but available before the first file system was instanciated.
- Returns:
- a Collection of the file systems Capabilities.
-