|
||||||||||
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.JarEntryHandler
public class JarEntryHandler
JarEntryHandler.
Field Summary |
---|
Fields inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
---|
cachedLastModified, log, vfsUrl |
Constructor Summary | |
---|---|
JarEntryHandler(VFSContext context,
VirtualFileHandler parent,
java.util.jar.JarFile jar,
java.util.jar.JarEntry entry,
java.lang.String entryName,
java.net.URL url)
Create a new JarHandler. |
Method Summary | |
---|---|
void |
addChild(VirtualFileHandler child)
Add a child to an entry |
VirtualFileHandler |
createChildHandler(java.lang.String name)
TODO: synchronization on lazy entryMap creation |
VirtualFileHandler |
findChild(java.lang.String path)
Find a child |
java.util.List<VirtualFileHandler> |
getChildren(boolean ignoreErrors)
Get the children |
protected java.util.jar.JarEntry |
getEntry()
Get the entry |
long |
getLastModified()
When the file was last modified |
long |
getSize()
Get the size |
boolean |
hasBeenModified()
Returns true if the file has been modified since this method was last called Last modified time is initialized at handler instantiation. |
protected void |
initCacheLastModified()
|
boolean |
isHidden()
Whether it is hidden |
boolean |
isLeaf()
Whether it is a simple leaf of the VFS, i.e. |
java.io.InputStream |
openStream()
Access the file contents. |
Methods inherited from class org.jboss.virtual.plugins.context.AbstractURLHandler |
---|
getURL, toURI, toURL |
Methods inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
---|
checkClosed, close, doClose, equals, getName, getParent, getPathName, getVFSContext, getVirtualFile, hashCode, simpleFindChild, structuredFindChild, toString, toVfsUrl |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JarEntryHandler(VFSContext context, VirtualFileHandler parent, java.util.jar.JarFile jar, java.util.jar.JarEntry entry, java.lang.String entryName, java.net.URL url) throws java.io.IOException
context
- the contextparent
- the parentjar
- the jar fileentry
- the entryentryName
- the entry nameurl
- the url
java.io.IOException
- for an error accessing the file system
java.lang.IllegalArgumentException
- for a null context, url, jar or entryMethod Detail |
---|
protected void initCacheLastModified()
initCacheLastModified
in class AbstractURLHandler
public boolean hasBeenModified() throws java.io.IOException
VirtualFileHandler
hasBeenModified
in interface VirtualFileHandler
hasBeenModified
in class AbstractVirtualFileHandler
java.io.IOException
public void addChild(VirtualFileHandler child)
child
- protected java.util.jar.JarEntry getEntry()
public long getLastModified()
VirtualFileHandler
getLastModified
in interface VirtualFileHandler
getLastModified
in class AbstractURLHandler
public long getSize()
VirtualFileHandler
getSize
in interface VirtualFileHandler
getSize
in class AbstractURLHandler
public boolean isLeaf()
VirtualFileHandler
isLeaf
in interface VirtualFileHandler
public boolean isHidden()
VirtualFileHandler
isHidden
in interface VirtualFileHandler
isHidden
in class AbstractURLHandler
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 java.io.InputStream openStream() throws java.io.IOException
VirtualFileHandler
openStream
in interface VirtualFileHandler
openStream
in class AbstractURLHandler
java.io.IOException
- for any problem accessing the virtual file systempublic VirtualFileHandler createChildHandler(java.lang.String name) throws java.io.IOException
createChildHandler
in interface StructuredVirtualFileHandler
name
- the name
java.io.IOException
- for any error accessing the virtual file system
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |