org.apache.commons.vfs.provider.jar
Class JarFileSystem
java.lang.Object
org.apache.commons.vfs.provider.AbstractVfsComponent
org.apache.commons.vfs.provider.AbstractFileSystem
org.apache.commons.vfs.provider.zip.ZipFileSystem
org.apache.commons.vfs.provider.jar.JarFileSystem
- All Implemented Interfaces:
- FileSystem, VfsComponent
public class JarFileSystem
- extends ZipFileSystem
A read-only file system for Jar files.
- Version:
- $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Mi, 29 Nov 2006) $
- Author:
- Brian Olsen
Field Summary |
private java.util.jar.Attributes |
attributes
|
Method Summary |
protected void |
addCapabilities(java.util.Collection caps)
Returns the capabilities of this file system. |
protected java.util.zip.ZipFile |
createZipFile(java.io.File file)
|
protected ZipFileObject |
createZipFileObject(FileName name,
java.util.zip.ZipEntry entry)
|
(package private) java.lang.Object |
getAttribute(java.util.jar.Attributes.Name attrName)
|
java.lang.Object |
getAttribute(java.lang.String attrName)
Retrives the attribute with the specified name. |
(package private) java.util.jar.Attributes |
getAttributes()
|
protected java.util.zip.ZipFile |
getZipFile()
|
(package private) java.util.jar.Attributes.Name |
lookupName(java.lang.String attrName)
|
Methods inherited from class org.apache.commons.vfs.provider.AbstractFileSystem |
addJunction, addListener, close, closeCommunicationLink, decorateFileObject, doReplicateFile, fireFileChanged, fireFileCreated, fireFileDeleted, getFileFromCache, getFileSystemManager, getFileSystemOptions, getLastModTimeAccuracy, getParentLayer, getRoot, getRootName, hasCapability, isOpen, isReleaseable, notifyAllStreamsClosed, putFileToCache, removeFileFromCache, removeJunction, removeListener, replicateFile, resolveFile, resolveFile, setAttribute |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.commons.vfs.FileSystem |
addJunction, addListener, getFileSystemManager, getFileSystemOptions, getLastModTimeAccuracy, getParentLayer, getRoot, getRootName, hasCapability, removeJunction, removeListener, replicateFile, resolveFile, resolveFile, setAttribute |
attributes
private java.util.jar.Attributes attributes
JarFileSystem
protected JarFileSystem(FileName rootName,
FileObject file,
FileSystemOptions fileSystemOptions)
throws FileSystemException
- Throws:
FileSystemException
createZipFile
protected java.util.zip.ZipFile createZipFile(java.io.File file)
throws FileSystemException
- Overrides:
createZipFile
in class ZipFileSystem
- Throws:
FileSystemException
createZipFileObject
protected ZipFileObject createZipFileObject(FileName name,
java.util.zip.ZipEntry entry)
throws FileSystemException
- Overrides:
createZipFileObject
in class ZipFileSystem
- Throws:
FileSystemException
addCapabilities
protected void addCapabilities(java.util.Collection caps)
- Returns the capabilities of this file system.
- Overrides:
addCapabilities
in class ZipFileSystem
getAttributes
java.util.jar.Attributes getAttributes()
throws java.io.IOException
- Throws:
java.io.IOException
getAttribute
java.lang.Object getAttribute(java.util.jar.Attributes.Name attrName)
throws FileSystemException
- Throws:
FileSystemException
lookupName
java.util.jar.Attributes.Name lookupName(java.lang.String attrName)
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 interface FileSystem
- Overrides:
getAttribute
in class AbstractFileSystem
- Parameters:
attrName
- The name of the attribute.
- Returns:
- The value of the attribute.
- Throws:
FileSystemException
- If the file does not exist, or is being written, or if the
attribute is unknown.- See Also:
FileContent.getAttribute(java.lang.String)
getZipFile
protected java.util.zip.ZipFile getZipFile()
throws FileSystemException
- Overrides:
getZipFile
in class ZipFileSystem
- Throws:
FileSystemException