|
||||||||||
| 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,
JarFile jar,
JarEntry entry,
String entryName,
URL url)
Create a new JarHandler. |
|
| Method Summary | |
|---|---|
void |
addChild(VirtualFileHandler child)
Add a child to an entry |
VirtualFileHandler |
createChildHandler(String name)
TODO: synchronization on lazy entryMap creation |
VirtualFileHandler |
findChild(String path)
Find a child |
List<VirtualFileHandler> |
getChildren(boolean ignoreErrors)
Get the children |
protected 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. |
InputStream |
openStream()
Access the file contents. |
| Methods inherited from class org.jboss.virtual.plugins.context.AbstractURLHandler |
|---|
exists, getURL, toURI, toURL |
| Methods inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
|---|
checkClosed, close, decrement, doClose, equals, getName, getParent, getPathName, getVFSContext, getVirtualFile, hashCode, increment, setPathName, 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,
JarFile jar,
JarEntry entry,
String entryName,
URL url)
throws IOException
context - the contextparent - the parentjar - the jar fileentry - the entryentryName - the entry nameurl - the url
IOException - for an error accessing the file system
IllegalArgumentException - for a null context, url, jar or entry| Method Detail |
|---|
protected void initCacheLastModified()
initCacheLastModified in class AbstractURLHandler
public boolean hasBeenModified()
throws IOException
VirtualFileHandler
hasBeenModified in interface VirtualFileHandlerhasBeenModified in class AbstractVirtualFileHandlerIOExceptionpublic void addChild(VirtualFileHandler child)
child - protected JarEntry getEntry()
public long getLastModified()
VirtualFileHandler
getLastModified in interface VirtualFileHandlergetLastModified in class AbstractURLHandlerpublic long getSize()
VirtualFileHandler
getSize in interface VirtualFileHandlergetSize in class AbstractURLHandlerpublic boolean isLeaf()
VirtualFileHandler
isLeaf in interface VirtualFileHandlerpublic boolean isHidden()
VirtualFileHandler
isHidden in interface VirtualFileHandlerisHidden in class AbstractURLHandler
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 InputStream openStream()
throws IOException
VirtualFileHandler
openStream in interface VirtualFileHandleropenStream in class AbstractURLHandlerIOException - for any problem accessing the virtual file system
public VirtualFileHandler createChildHandler(String name)
throws IOException
createChildHandler in interface StructuredVirtualFileHandlername - the name
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 | |||||||||