|
||||||||||
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
org.jboss.virtual.plugins.context.jar.JarEntryHandler
public class JarEntryHandler
JarEntryHandler. TODO: JBVFS-7
Field Summary |
---|
Fields inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
---|
cachedLastModified, log |
Constructor Summary | |
---|---|
JarEntryHandler(VFSContext context,
VirtualFileHandler parent,
JarFile jar,
ZipEntry 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)
Create a virtual file context |
boolean |
delete(String path)
|
VirtualFileHandler |
getChild(String path)
Get a child |
List<VirtualFileHandler> |
getChildren(boolean ignoreErrors)
Get the children |
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()
|
protected void |
internalReplaceChild(VirtualFileHandler original,
VirtualFileHandler replacement)
Replace original child with unpacked replacement. |
boolean |
isHidden()
Whether it is hidden |
boolean |
isLeaf()
Whether it is a simple leaf of the VFS, i.e. |
boolean |
isNested()
Are we nested in some archive. |
InputStream |
openStream()
Access the file contents. |
boolean |
removeChild(String path)
Remove a child |
Methods inherited from class org.jboss.virtual.plugins.context.jar.AbstractJarHandler |
---|
fromURL, getEntry, getJar, getURL, handleJarFile |
Methods inherited from class org.jboss.virtual.plugins.context.AbstractURLHandler |
---|
exists, getURL, openConnection, openConnection, toURI, toURL |
Methods inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
---|
checkClosed, checkParentExists, cleanup, close, decrement, delete, doClose, equals, getChildPathName, getChildVfsUrl, getLocalPathName, getLocalVFSContext, getName, getParent, getPathName, getRealURL, getReferences, getVFSContext, getVfsUrl, getVirtualFile, hashCode, increment, isArchive, isTemporary, replaceChild, setPathName, setVfsUrl, simpleFindChild, structuredFindChild, toInternalVfsUrl, toString, toStringLocal, 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, ZipEntry 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 entryMethod Detail |
---|
protected void initCacheLastModified()
initCacheLastModified
in class AbstractURLHandler
public boolean hasBeenModified() throws IOException
VirtualFileHandler
hasBeenModified
in interface VirtualFileHandler
hasBeenModified
in class AbstractVirtualFileHandler
IOException
- for any errorpublic void addChild(VirtualFileHandler child)
addChild
in interface HierarchyVirtualFileHandler
child
- the childpublic 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
isLeaf
in class AbstractJarHandler
public boolean isHidden()
VirtualFileHandler
isHidden
in interface VirtualFileHandler
isHidden
in class AbstractURLHandler
public boolean isNested() throws IOException
VirtualFileHandler
isNested
in interface VirtualFileHandler
IOException
- for any errorpublic List<VirtualFileHandler> getChildren(boolean ignoreErrors) throws IOException
VirtualFileHandler
getChildren
in interface VirtualFileHandler
ignoreErrors
- whether to ignore errors
IOException
- for an error accessing the file systempublic InputStream openStream() throws IOException
VirtualFileHandler
openStream
in interface VirtualFileHandler
openStream
in class AbstractURLHandler
IOException
- for any problem accessing the virtual file systempublic VirtualFileHandler createChildHandler(String name) throws IOException
StructuredVirtualFileHandler
createChildHandler
in interface StructuredVirtualFileHandler
name
- the name
IOException
- for any error accessing the virtual file systempublic VirtualFileHandler getChild(String path) throws IOException
VirtualFileHandler
getChild
in interface VirtualFileHandler
path
- the path
null
if not found
IOException
- for an error accessing the file systempublic boolean removeChild(String path) throws IOException
VirtualFileHandler
removeChild
in interface VirtualFileHandler
path
- child name
IOException
- if an error occurspublic boolean delete(String path)
protected void internalReplaceChild(VirtualFileHandler original, VirtualFileHandler replacement)
AbstractVirtualFileHandler
internalReplaceChild
in class AbstractVirtualFileHandler
original
- the originalreplacement
- the replacement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |