Class JarFileSystem
java.lang.Object
org.apache.commons.vfs2.provider.AbstractVfsComponent
org.apache.commons.vfs2.provider.AbstractFileSystem
org.apache.commons.vfs2.provider.zip.ZipFileSystem
org.apache.commons.vfs2.provider.jar.JarFileSystem
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- FileSystem,- VfsComponent
A read-only file system for Jar files.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedJarFileSystem(AbstractFileName rootFileName, FileObject parentLayer, FileSystemOptions fileSystemOptions) Constructs a new instance.
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidaddCapabilities(Collection<Capability> caps) Returns the capabilities of this file system.protected ZipFilecreateZipFile(File file) Creates a Zip file.protected ZipFileObjectcreateZipFileObject(AbstractFileName name, ZipEntry entry) Creates a new Zip file object.getAttribute(String attrName) Retrieves the attribute with the specified name.protected ZipFileGets the zip file.Methods inherited from class org.apache.commons.vfs2.provider.zip.ZipFileSystemcreateFile, doCloseCommunicationLink, getCharset, getFileFromCache, init, putFileToCache, removeFileFromCache, toStringMethods inherited from class org.apache.commons.vfs2.provider.AbstractFileSystemaddJunction, addListener, close, closeCommunicationLink, decorateFileObject, doReplicateFile, fireFileChanged, fireFileCreated, fireFileDeleted, getFileSystemManager, getFileSystemOptions, getLastModTimeAccuracy, getParentLayer, getRoot, getRootName, getRootURI, hasCapability, isOpen, isReleaseable, notifyAllStreamsClosed, removeJunction, removeListener, replicateFile, resolveFile, resolveFile, setAttributeMethods inherited from class org.apache.commons.vfs2.provider.AbstractVfsComponentgetContext, getLogger, setContext, setLogger
- 
Constructor Details- 
JarFileSystemprotected JarFileSystem(AbstractFileName rootFileName, FileObject parentLayer, FileSystemOptions fileSystemOptions) throws FileSystemException Constructs a new instance.- Parameters:
- rootFileName- The root file name of this file system.
- parentLayer- The parent layer of this file system.
- fileSystemOptions- Options to build this file system.
- Throws:
- FileSystemException- If the parent layer does not exist, or on error replicating the file.
 
 
- 
- 
Method Details- 
addCapabilitiesReturns the capabilities of this file system.- Overrides:
- addCapabilitiesin class- ZipFileSystem
- Parameters:
- caps- collections of Capabilities, can be immutable.
 
- 
createZipFileDescription copied from class:ZipFileSystemCreates a Zip file.- Overrides:
- createZipFilein class- ZipFileSystem
- Parameters:
- file- the underlying file.
- Returns:
- a Zip file.
- Throws:
- FileSystemException- if a file system error occurs.
 
- 
createZipFileObjectprotected ZipFileObject createZipFileObject(AbstractFileName name, ZipEntry entry) throws FileSystemException Description copied from class:ZipFileSystemCreates a new Zip file object.- Overrides:
- createZipFileObjectin class- ZipFileSystem
- Parameters:
- name- the underlying file.
- entry- the Zip entry.
- Returns:
- a new ZipFileObject.
- Throws:
- FileSystemException- if a file system error occurs.
 
- 
getAttributeRetrieves the attribute with the specified name. The default implementation simply throws an exception.- Specified by:
- getAttributein interface- FileSystem
- Overrides:
- getAttributein class- AbstractFileSystem
- Parameters:
- attrName- The attribute's name.
- Returns:
- The value of the attribute.
- Throws:
- FileSystemException- if an error occurs.
- See Also:
 
- 
getZipFileDescription copied from class:ZipFileSystemGets the zip file.- Overrides:
- getZipFilein class- ZipFileSystem
- Returns:
- the zip file.
- Throws:
- FileSystemException- if a file system error occurs.
 
 
-