Class ZipFileProvider
- 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.zip.ZipFileProvider
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,FileProvider
,VfsComponent
- Direct Known Subclasses:
JarFileProvider
public class ZipFileProvider extends AbstractLayeredFileProvider
A file system provider for ZIP files. Provides read-only file systems.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.util.Collection<Capability>
capabilities
The list of capabilities this provider supports
-
Constructor Summary
Constructors Constructor Description ZipFileProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FileSystem
doCreateFileSystem(java.lang.String scheme, FileObject file, FileSystemOptions fileSystemOptions)
Creates a layered file system.java.util.Collection<Capability>
getCapabilities()
Gets the file system capabilities.FileSystemConfigBuilder
getConfigBuilder()
Return config builder.-
Methods inherited from class org.apache.commons.vfs2.provider.AbstractLayeredFileProvider
createFileSystem, findFile
-
Methods inherited from class org.apache.commons.vfs2.provider.AbstractFileProvider
addFileSystem, close, closeFileSystem, findFileSystem, freeUnusedResources, getFileNameParser, parseUri, setFileNameParser
-
Methods inherited from class org.apache.commons.vfs2.provider.AbstractVfsContainer
addComponent, removeComponent
-
Methods inherited from class org.apache.commons.vfs2.provider.AbstractVfsComponent
getContext, getLogger, init, setContext, setLogger
-
-
-
-
Field Detail
-
capabilities
protected static final java.util.Collection<Capability> capabilities
The list of capabilities this provider supports
-
-
Method Detail
-
doCreateFileSystem
protected 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.- Specified by:
doCreateFileSystem
in 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.
-
getCapabilities
public java.util.Collection<Capability> getCapabilities()
Description copied from interface:FileProvider
Gets 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.
-
getConfigBuilder
public FileSystemConfigBuilder getConfigBuilder()
Return config builder.- Specified by:
getConfigBuilder
in interfaceFileProvider
- Overrides:
getConfigBuilder
in classAbstractFileProvider
- Returns:
- A config builder for ZipFileProvider.
- See Also:
AbstractFileProvider.getConfigBuilder()
-
-