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 protected
JarFileSystem(AbstractFileName rootName, FileObject file, FileSystemOptions fileSystemOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addCapabilities(java.util.Collection<Capability> caps)
Returns the capabilities of this file system.protected java.util.zip.ZipFile
createZipFile(java.io.File file)
protected ZipFileObject
createZipFileObject(AbstractFileName name, java.util.zip.ZipEntry entry)
java.lang.Object
getAttribute(java.lang.String attrName)
Retrives the attribute with the specified name.protected java.util.zip.ZipFile
getZipFile()
-
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:
createZipFile
in classZipFileSystem
- Throws:
FileSystemException
-
createZipFileObject
protected ZipFileObject createZipFileObject(AbstractFileName name, java.util.zip.ZipEntry entry) throws FileSystemException
- Overrides:
createZipFileObject
in classZipFileSystem
- Throws:
FileSystemException
-
addCapabilities
protected void addCapabilities(java.util.Collection<Capability> caps)
Returns the capabilities of this file system.- Overrides:
addCapabilities
in 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:
getAttribute
in interfaceFileSystem
- Overrides:
getAttribute
in 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:
getZipFile
in classZipFileSystem
- Throws:
FileSystemException
-
-