|
||||||||||
| 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 |
|---|
exists, getLastModified, getSize, getURL, initCacheLastModified, isHidden, openStream, toURI, toURL |
| Methods inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
|---|
checkClosed, close, decrement, equals, getName, getParent, getPathName, getVFSContext, getVirtualFile, hasBeenModified, hashCode, increment, setPathName, 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 vfsPath| Method 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 jarFile
protected 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.MalformedURLExceptionprotected void doClose()
AbstractVirtualFileHandler
doClose in class AbstractVirtualFileHandlerpublic boolean isLeaf()
VirtualFileHandler
isLeaf in interface VirtualFileHandler
public java.util.List<VirtualFileHandler> getChildren(boolean ignoreErrors)
throws java.io.IOException
VirtualFileHandler
getChildren in interface VirtualFileHandlerignoreErrors - whether to ignore errors
java.io.IOException - for an error accessing the file system
public VirtualFileHandler findChild(java.lang.String path)
throws java.io.IOException
VirtualFileHandler
findChild in interface VirtualFileHandlerpath - 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 StructuredVirtualFileHandlername - the name
java.io.IOException - for any error accessing the virtual file system
protected 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 entry
public 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 | |||||||||