org.jboss.virtual.plugins.context.jar
Class NestedJarHandler
java.lang.Object
org.jboss.virtual.plugins.context.AbstractVirtualFileHandler
org.jboss.virtual.plugins.context.AbstractURLHandler
org.jboss.virtual.plugins.context.jar.AbstractJarHandler
org.jboss.virtual.plugins.context.jar.NestedJarHandler
- All Implemented Interfaces:
- java.io.Serializable, StructuredVirtualFileHandler, VirtualFileHandler
public class NestedJarHandler
- extends AbstractJarHandler
Nested Jar Handler.
- Version:
- $Revision: 1.1 $
- Author:
- Adrian Brock, Scott.Stark@jboss.org
- See Also:
- Serialized Form
Constructor Summary |
protected |
NestedJarHandler(VFSContext context,
VirtualFileHandler parent,
java.util.jar.JarFile parentJar,
java.util.jar.JarEntry entry,
java.net.URL original,
java.io.File temp,
java.lang.String entryName)
Create a new NestedJarHandler. |
Methods inherited from class org.jboss.virtual.plugins.context.jar.AbstractJarHandler |
buildParents, createChildHandler, createVirtualFileHandler, doClose, findChild, fromURL, getChildren, getEntryName, getJar, getURL, initJarFile, isLeaf |
Methods inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
checkClosed, close, equals, getName, getParent, getPathName, getVFSContext, getVirtualFile, hasBeenModified, hashCode, simpleFindChild, structuredFindChild, toString, toVfsUrl |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
NestedJarHandler
protected NestedJarHandler(VFSContext context,
VirtualFileHandler parent,
java.util.jar.JarFile parentJar,
java.util.jar.JarEntry entry,
java.net.URL original,
java.io.File temp,
java.lang.String entryName)
throws java.io.IOException
- Create a new NestedJarHandler.
- Parameters:
context
- the contextparent
- the parentparentJar
- the parent jar fileentry
- the jar entryoriginal
- the original urltemp
- the temporary fileentryName
- the entry name
- Throws:
java.io.IOException
- for an error accessing the file system
java.lang.IllegalArgumentException
- for a null context, url or vfsPath
create
public static NestedJarHandler create(VFSContext context,
VirtualFileHandler parent,
java.util.jar.JarFile parentJar,
java.util.jar.JarEntry entry,
java.net.URL url,
java.lang.String entryName)
throws java.io.IOException
- Throws:
java.io.IOException
getEntry
protected java.util.jar.JarEntry getEntry()
- Get the entry
- Returns:
- the file
getLastModified
public long getLastModified()
throws java.io.IOException
- Description copied from interface:
VirtualFileHandler
- When the file was last modified
- Specified by:
getLastModified
in interface VirtualFileHandler
- Overrides:
getLastModified
in class AbstractURLHandler
- Returns:
- the last modified time
- Throws:
java.io.IOException
- for any problem accessing the virtual file system
getSize
public long getSize()
throws java.io.IOException
- Description copied from interface:
VirtualFileHandler
- Get the size
- Specified by:
getSize
in interface VirtualFileHandler
- Overrides:
getSize
in class AbstractURLHandler
- Returns:
- the size
- Throws:
java.io.IOException
- for any problem accessing the virtual file system
openStream
public java.io.InputStream openStream()
throws java.io.IOException
- Overriden to return the raw tmp jar file stream
- Specified by:
openStream
in interface VirtualFileHandler
- Overrides:
openStream
in class AbstractURLHandler
- Returns:
- An InputStream for the file contents.
- Throws:
java.io.IOException
- for any problem accessing the virtual file system