|
||||||||||
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.JarEntryContents
public class JarEntryContents
A nested jar contents implementation used to represent a jar within a jar.
Field Summary |
---|
Fields inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
---|
cachedLastModified, log |
Method Summary | |
---|---|
void |
addChild(VirtualFileHandler child)
Add a child to an entry |
void |
close()
Close the resources |
VirtualFileHandler |
createChildHandler(java.lang.String name)
Create a virtual file context |
boolean |
delete(int gracePeriod)
Delete the file represented by this handler. |
boolean |
exists()
TODO: removing the entry/jar that resulted in this needs to be detected. |
protected VirtualFileHandler |
findChildHandler(java.lang.String name)
Find the handler. |
VirtualFileHandler |
getChild(java.lang.String path)
Get a child |
java.util.List<VirtualFileHandler> |
getChildren(boolean ignoreErrors)
Get the children |
long |
getLastModified()
When the file was last modified |
long |
getSize()
Get the size |
protected void |
initCacheLastModified()
|
protected void |
initNestedJar()
|
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. |
java.io.InputStream |
openStream()
Access the file contents. |
boolean |
removeChild(java.lang.String path)
Remove a child |
java.lang.String |
toString()
|
java.net.URI |
toURI()
Get the VF URI (file://root/org/jboss/X.java) |
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 |
---|
getURL, openConnection, openConnection, toURL |
Methods inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
---|
checkClosed, checkParentExists, cleanup, decrement, doClose, equals, getCertificates, getChildPathName, getChildVfsUrl, getLocalPathName, getLocalVFSContext, getName, getParent, getPathName, getRealURL, getReferences, getVFSContext, getVfsUrl, getVirtualFile, hasBeenModified, hashCode, increment, isArchive, isTemporary, replaceChild, setPathName, setVfsUrl, simpleFindChild, structuredFindChild, toInternalVfsUrl, toStringLocal, toVfsUrl |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
protected void initCacheLastModified()
initCacheLastModified
in class AbstractURLHandler
public void addChild(VirtualFileHandler child)
addChild
in interface HierarchyVirtualFileHandler
child
- the childpublic boolean exists() throws java.io.IOException
exists
in interface VirtualFileHandler
exists
in class AbstractURLHandler
java.io.IOException
- - thrown on failure to detect existence.URLConnection.getLastModified()
,
org.jboss.test.virtual.test.URLExistsUnitTestCase
public boolean isHidden() throws java.io.IOException
VirtualFileHandler
isHidden
in interface VirtualFileHandler
isHidden
in class AbstractURLHandler
java.io.IOException
- for any problem accessing the virtual file systempublic boolean isNested() throws java.io.IOException
VirtualFileHandler
isNested
in interface VirtualFileHandler
java.io.IOException
- for any errorpublic 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 createChildHandler(java.lang.String name) throws java.io.IOException
StructuredVirtualFileHandler
createChildHandler
in interface StructuredVirtualFileHandler
name
- the name
java.io.IOException
- for any error accessing the virtual file systempublic VirtualFileHandler getChild(java.lang.String path) throws java.io.IOException
VirtualFileHandler
getChild
in interface VirtualFileHandler
path
- the path
null
if not found
java.io.IOException
- for an error accessing the file systempublic boolean removeChild(java.lang.String path)
VirtualFileHandler
removeChild
in interface VirtualFileHandler
path
- child name
protected VirtualFileHandler findChildHandler(java.lang.String name) throws java.io.IOException
name
- the path name
null
is it doesn't exist
java.io.IOException
- for any errorpublic 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 delete(int gracePeriod)
AbstractVirtualFileHandler
VirtualFileHandler.removeChild(String)
of the parent
delete
in interface VirtualFileHandler
delete
in class AbstractVirtualFileHandler
gracePeriod
- max time to wait for any locks
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 void close()
VirtualFileHandler
close
in interface VirtualFileHandler
close
in class AbstractVirtualFileHandler
public java.net.URI toURI() throws java.net.URISyntaxException
VirtualFileHandler
toURI
in interface VirtualFileHandler
toURI
in class AbstractURLHandler
java.net.URISyntaxException
- for an error parsing the URIprotected void internalReplaceChild(VirtualFileHandler original, VirtualFileHandler replacement)
AbstractVirtualFileHandler
internalReplaceChild
in class AbstractVirtualFileHandler
original
- the originalreplacement
- the replacementpublic java.lang.String toString()
toString
in class AbstractVirtualFileHandler
protected void initNestedJar() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |