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.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJarFileSystem(AbstractFileName rootName, FileObject file, FileSystemOptions fileSystemOptions) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddCapabilities(Collection<Capability> caps) Returns the capabilities of this file system.protected ZipFilecreateZipFile(File file) protected ZipFileObjectcreateZipFileObject(AbstractFileName name, ZipEntry entry) getAttribute(String attrName) Retrives the attribute with the specified name.(package private) ObjectgetAttribute(Attributes.Name attrName) (package private) Attributesprotected ZipFile(package private) Attributes.NamelookupName(String attrName) Methods inherited from class ZipFileSystem
createFile, doCloseCommunicationLink, getCharset, getFileFromCache, init, putFileToCache, removeFileFromCache, toStringMethods inherited from class AbstractFileSystem
addJunction, 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 AbstractVfsComponent
getContext, getLogger, setContext, setLogger
-
Field Details
-
attributes
-
-
Constructor Details
-
JarFileSystem
protected JarFileSystem(AbstractFileName rootName, FileObject file, FileSystemOptions fileSystemOptions) throws FileSystemException - Throws:
FileSystemException
-
-
Method Details
-
createZipFile
- Overrides:
createZipFilein classZipFileSystem- Throws:
FileSystemException
-
createZipFileObject
protected ZipFileObject createZipFileObject(AbstractFileName name, ZipEntry entry) throws FileSystemException - Overrides:
createZipFileObjectin classZipFileSystem- Throws:
FileSystemException
-
addCapabilities
Returns the capabilities of this file system.- Overrides:
addCapabilitiesin classZipFileSystem- Parameters:
caps- collections of Capabilities, can be immutable.
-
getAttributes
- Throws:
IOException
-
getAttribute
- Throws:
FileSystemException
-
lookupName
-
getAttribute
Retrives the attribute with the specified name. The default implementation simply throws an exception.- Specified by:
getAttributein interfaceFileSystem- Overrides:
getAttributein classAbstractFileSystem- Parameters:
attrName- The attiribute's name.- Returns:
- The value of the attribute.
- Throws:
FileSystemException- if an error occurs.- See Also:
-
getZipFile
- Overrides:
getZipFilein classZipFileSystem- Throws:
FileSystemException
-