|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.virtual.plugins.context.AbstractVirtualFileHandler
org.jboss.virtual.plugins.context.AbstractURLHandler
org.jboss.virtual.plugins.context.jar.AbstractJarHandler
public class AbstractJarHandler
AbstractJarHandler.
Field Summary |
---|
Fields inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
---|
cachedLastModified, log, vfsUrl |
Constructor Summary | |
---|---|
protected |
AbstractJarHandler(VFSContext context,
VirtualFileHandler parent,
java.net.URL url,
java.lang.String name)
Create a new JarHandler. |
Method Summary | |
---|---|
protected VirtualFileHandler |
buildParents(java.lang.String parentName,
java.util.Map<java.lang.String,VirtualFileHandler> parentMap,
java.util.jar.JarEntry entry)
Create any missing parents. |
VirtualFileHandler |
createChildHandler(java.lang.String name)
Create a virtual file context |
protected VirtualFileHandler |
createVirtualFileHandler(VirtualFileHandler parent,
java.util.jar.JarEntry entry,
java.lang.String entryName)
Create a new virtual file handler |
protected void |
doClose()
The real close |
VirtualFileHandler |
findChild(java.lang.String path)
Find a child |
static java.util.jar.JarFile |
fromURL(java.net.URL url)
Convert a URL into a JarFIle |
java.util.List<VirtualFileHandler> |
getChildren(boolean ignoreErrors)
Get the children |
protected static java.lang.String |
getEntryName(java.util.jar.JarEntry entry)
Get a jar entry name |
java.util.jar.JarFile |
getJar()
Get the jar. |
protected java.net.URL |
getURL(VirtualFileHandler parent,
java.lang.String path,
boolean isDirEntry)
Create the URL for the entry represented by path. |
protected void |
initJarFile(java.util.jar.JarFile jarFile)
Initialise the jar file |
boolean |
isLeaf()
Whether it is a simple leaf of the VFS, i.e. |
Methods inherited from class org.jboss.virtual.plugins.context.AbstractURLHandler |
---|
getLastModified, getSize, getURL, initCacheLastModified, isHidden, openStream, toURI, toURL |
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 |
Constructor Detail |
---|
protected AbstractJarHandler(VFSContext context, VirtualFileHandler parent, java.net.URL url, java.lang.String name) throws java.io.IOException
context
- the contextparent
- the parenturl
- the urlname
- the name
java.io.IOException
- for an error accessing the file system
java.lang.IllegalArgumentException
- for a null context, url or vfsPathMethod Detail |
---|
protected static java.lang.String getEntryName(java.util.jar.JarEntry entry)
entry
- the entry
java.lang.IllegalArgumentException
- for a null entrypublic java.util.jar.JarFile getJar()
protected void initJarFile(java.util.jar.JarFile jarFile) throws java.io.IOException
jarFile
- the jar file
java.io.IOException
- for any error reading the jar file
java.lang.IllegalArgumentException
- for a null jarFileprotected VirtualFileHandler buildParents(java.lang.String parentName, java.util.Map<java.lang.String,VirtualFileHandler> parentMap, java.util.jar.JarEntry entry) throws java.io.IOException
parentName
- full vfs path name of parentparentMap
- initJarFile parentMapentry
- JarEntry missing a parent
java.io.IOException
protected java.net.URL getURL(VirtualFileHandler parent, java.lang.String path, boolean isDirEntry) throws java.net.MalformedURLException
parent
- - the parent handlerpath
- - the simple path to the entry without any trailing '/'isDirEntry
- - whether this is a directory entry
java.net.MalformedURLException
protected void doClose()
AbstractVirtualFileHandler
doClose
in class AbstractVirtualFileHandler
public boolean isLeaf()
VirtualFileHandler
isLeaf
in interface VirtualFileHandler
public java.util.List<VirtualFileHandler> getChildren(boolean ignoreErrors) throws java.io.IOException
VirtualFileHandler
getChildren
in interface VirtualFileHandler
ignoreErrors
- whether to ignore errors
java.io.IOException
- for an error accessing the file systempublic VirtualFileHandler findChild(java.lang.String path) throws java.io.IOException
VirtualFileHandler
findChild
in interface VirtualFileHandler
path
- the path
java.io.IOException
- for an error accessing the file system (or the child doesn't exist)public VirtualFileHandler createChildHandler(java.lang.String name) throws java.io.IOException
StructuredVirtualFileHandler
createChildHandler
in interface StructuredVirtualFileHandler
name
- the name
java.io.IOException
- for any error accessing the virtual file systemprotected VirtualFileHandler createVirtualFileHandler(VirtualFileHandler parent, java.util.jar.JarEntry entry, java.lang.String entryName) throws java.io.IOException
parent
- the parententry
- the entryentryName
- - the entry name without any trailing '/'
java.io.IOException
- for any error accessing the file system
java.lang.IllegalArgumentException
- for a null parent or entrypublic static java.util.jar.JarFile fromURL(java.net.URL url) throws java.io.IOException
url
- the url to convert
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |