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:
FileSystem,VfsComponent
public class JarFileSystem extends ZipFileSystem
A read-only file system for Jar files.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJarFileSystem(AbstractFileName rootName, FileObject file, FileSystemOptions fileSystemOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddCapabilities(java.util.Collection<Capability> caps)Returns the capabilities of this file system.protected java.util.zip.ZipFilecreateZipFile(java.io.File file)protected ZipFileObjectcreateZipFileObject(AbstractFileName name, java.util.zip.ZipEntry entry)java.lang.ObjectgetAttribute(java.lang.String attrName)Retrives the attribute with the specified name.protected java.util.zip.ZipFilegetZipFile()-
Methods inherited from class org.apache.commons.vfs2.provider.zip.ZipFileSystem
createFile, doCloseCommunicationLink, getFileFromCache, init, putFileToCache, removeFileFromCache, toString
-
Methods inherited from class org.apache.commons.vfs2.provider.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, setAttribute
-
Methods inherited from class org.apache.commons.vfs2.provider.AbstractVfsComponent
getContext, getLogger, setContext, setLogger
-
-
-
-
Constructor Detail
-
JarFileSystem
protected JarFileSystem(AbstractFileName rootName, FileObject file, FileSystemOptions fileSystemOptions) throws FileSystemException
- Throws:
FileSystemException
-
-
Method Detail
-
createZipFile
protected java.util.zip.ZipFile createZipFile(java.io.File file) throws FileSystemException
- Overrides:
createZipFilein classZipFileSystem- Throws:
FileSystemException
-
createZipFileObject
protected ZipFileObject createZipFileObject(AbstractFileName name, java.util.zip.ZipEntry entry) throws FileSystemException
- Overrides:
createZipFileObjectin classZipFileSystem- Throws:
FileSystemException
-
addCapabilities
protected void addCapabilities(java.util.Collection<Capability> caps)
Returns the capabilities of this file system.- Overrides:
addCapabilitiesin classZipFileSystem- Parameters:
caps- collections of Capabilities, can be immutable.
-
getAttribute
public java.lang.Object getAttribute(java.lang.String attrName) throws FileSystemException
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:
FileContent.getAttribute(java.lang.String)
-
getZipFile
protected java.util.zip.ZipFile getZipFile() throws FileSystemException
- Overrides:
getZipFilein classZipFileSystem- Throws:
FileSystemException
-
-