|
||||||||||
| 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,
URL url,
String name)
Create a new JarHandler. |
| Method Summary | |
|---|---|
protected VirtualFileHandler |
buildParents(String parentName,
Map<String,VirtualFileHandler> parentMap,
JarEntry entry)
Create any missing parents. |
VirtualFileHandler |
createChildHandler(String name)
Create a virtual file context |
protected VirtualFileHandler |
createVirtualFileHandler(VirtualFileHandler parent,
JarEntry entry,
String entryName)
Create a new virtual file handler |
protected void |
doClose()
The real close |
VirtualFileHandler |
findChild(String path)
Find a child |
static JarFile |
fromURL(URL url)
Convert a URL into a JarFIle |
List<VirtualFileHandler> |
getChildren(boolean ignoreErrors)
Get the children |
protected static String |
getEntryName(JarEntry entry)
Get a jar entry name |
JarFile |
getJar()
Get the jar. |
protected URL |
getURL(VirtualFileHandler parent,
String path,
boolean isDirEntry)
Create the URL for the entry represented by path. |
protected void |
initJarFile(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,
URL url,
String name)
throws IOException
context - the contextparent - the parenturl - the urlname - the name
IOException - for an error accessing the file system
IllegalArgumentException - for a null context, url or vfsPath| Method Detail |
|---|
protected static String getEntryName(JarEntry entry)
entry - the entry
IllegalArgumentException - for a null entrypublic JarFile getJar()
protected void initJarFile(JarFile jarFile)
throws IOException
jarFile - the jar file
IOException - for any error reading the jar file
IllegalArgumentException - for a null jarFile
protected VirtualFileHandler buildParents(String parentName,
Map<String,VirtualFileHandler> parentMap,
JarEntry entry)
throws IOException
parentName - full vfs path name of parentparentMap - initJarFile parentMapentry - JarEntry missing a parent
IOException
protected URL getURL(VirtualFileHandler parent,
String path,
boolean isDirEntry)
throws MalformedURLException
parent - - the parent handlerpath - - the simple path to the entry without any trailing '/'isDirEntry - - whether this is a directory entry
MalformedURLExceptionprotected void doClose()
AbstractVirtualFileHandler
doClose in class AbstractVirtualFileHandlerpublic boolean isLeaf()
VirtualFileHandler
isLeaf in interface VirtualFileHandler
public List<VirtualFileHandler> getChildren(boolean ignoreErrors)
throws IOException
VirtualFileHandler
getChildren in interface VirtualFileHandlerignoreErrors - whether to ignore errors
IOException - for an error accessing the file system
public VirtualFileHandler findChild(String path)
throws IOException
VirtualFileHandler
findChild in interface VirtualFileHandlerpath - the path
IOException - for an error accessing the file system (or the child doesn't exist)
public VirtualFileHandler createChildHandler(String name)
throws IOException
StructuredVirtualFileHandler
createChildHandler in interface StructuredVirtualFileHandlername - the name
IOException - for any error accessing the virtual file system
protected VirtualFileHandler createVirtualFileHandler(VirtualFileHandler parent,
JarEntry entry,
String entryName)
throws IOException
parent - the parententry - the entryentryName - - the entry name without any trailing '/'
IOException - for any error accessing the file system
IllegalArgumentException - for a null parent or entry
public static JarFile fromURL(URL url)
throws IOException
url - the url to convert
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||