org.apache.commons.vfs2.provider.jar
Class JarFileSystem

java.lang.Object
  extended by org.apache.commons.vfs2.provider.AbstractVfsComponent
      extended by org.apache.commons.vfs2.provider.AbstractFileSystem
          extended by org.apache.commons.vfs2.provider.zip.ZipFileSystem
              extended by 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.

Author:
Commons VFS team

Constructor Summary
protected JarFileSystem(AbstractFileName rootName, FileObject file, FileSystemOptions fileSystemOptions)
           
 
Method Summary
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, init
 
Methods inherited from class org.apache.commons.vfs2.provider.AbstractFileSystem
addJunction, addListener, close, closeCommunicationLink, decorateFileObject, doReplicateFile, fireFileChanged, fireFileCreated, fireFileDeleted, getFileFromCache, getFileSystemManager, getFileSystemOptions, getLastModTimeAccuracy, getParentLayer, getRoot, getRootName, getRootURI, hasCapability, isOpen, isReleaseable, notifyAllStreamsClosed, putFileToCache, removeFileFromCache, removeJunction, removeListener, replicateFile, resolveFile, resolveFile, setAttribute
 
Methods inherited from class org.apache.commons.vfs2.provider.AbstractVfsComponent
getContext, getLogger, setContext, setLogger
 
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.vfs2.FileSystem
addJunction, addListener, getFileSystemManager, getFileSystemOptions, getLastModTimeAccuracy, getParentLayer, getRoot, getRootName, getRootURI, hasCapability, removeJunction, removeListener, replicateFile, resolveFile, resolveFile, setAttribute
 

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 class ZipFileSystem
Throws:
FileSystemException

createZipFileObject

protected ZipFileObject createZipFileObject(AbstractFileName name,
                                            java.util.zip.ZipEntry entry)
                                     throws FileSystemException
Overrides:
createZipFileObject in class ZipFileSystem
Throws:
FileSystemException

addCapabilities

protected void addCapabilities(java.util.Collection<Capability> caps)
Returns the capabilities of this file system.

Overrides:
addCapabilities in class ZipFileSystem

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 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 class ZipFileSystem
Throws:
FileSystemException