|
||||||||||
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.vfs.AssembledDirectoryHandler
public class AssembledDirectoryHandler
The assembled directory handler.
Field Summary |
---|
Fields inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
---|
cachedLastModified, log |
Constructor Summary | |
---|---|
AssembledDirectoryHandler(VFSContext context,
AssembledDirectoryHandler parent,
java.lang.String name)
|
Method Summary | |
---|---|
VirtualFileHandler |
addChild(VirtualFileHandler handler)
|
void |
cleanup()
Cleanup resources. |
VirtualFileHandler |
createChildHandler(java.lang.String name)
Create a virtual file context |
boolean |
exists()
Tests whether the underlying implementation file still exists. |
VirtualFileHandler |
findChild(java.lang.String name)
|
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 |
AssembledDirectory |
getVirtualFile()
Get the virtual file wrapper |
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 name)
This method removes a specified child from its list of children map |
java.net.URI |
toURI()
Get the VF URI (file://root/org/jboss/X.java) |
java.net.URL |
toURL()
Get the VF URL (file://root/org/jboss/X.java) |
Methods inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
---|
checkClosed, checkParentExists, close, decrement, delete, doClose, equals, getCertificates, getChildPathName, getChildVfsUrl, getLocalPathName, getLocalVFSContext, getName, getParent, getPathName, getRealURL, getReferences, getVFSContext, getVfsUrl, hasBeenModified, 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 AssembledDirectoryHandler(VFSContext context, AssembledDirectoryHandler parent, java.lang.String name) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public VirtualFileHandler addChild(VirtualFileHandler handler)
public boolean removeChild(java.lang.String name)
removeChild
in interface VirtualFileHandler
name
- child name
public void cleanup()
VirtualFileHandler
cleanup
in interface VirtualFileHandler
cleanup
in class AbstractVirtualFileHandler
public VirtualFileHandler findChild(java.lang.String name)
public 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 java.net.URI toURI() throws java.net.URISyntaxException
VirtualFileHandler
toURI
in interface VirtualFileHandler
java.net.URISyntaxException
- for an error parsing the URIpublic long getLastModified() throws java.io.IOException
VirtualFileHandler
getLastModified
in interface VirtualFileHandler
java.io.IOException
- for any problem accessing the virtual file systempublic long getSize() throws java.io.IOException
VirtualFileHandler
getSize
in interface VirtualFileHandler
java.io.IOException
- for any problem accessing the virtual file systempublic boolean exists() throws java.io.IOException
VirtualFileHandler
exists
in interface VirtualFileHandler
java.io.IOException
- - thrown on failure to detect existence.public boolean isLeaf() throws java.io.IOException
VirtualFileHandler
isLeaf
in interface VirtualFileHandler
java.io.IOException
- for any problem accessing the virtual file systempublic boolean isHidden() throws java.io.IOException
VirtualFileHandler
isHidden
in interface VirtualFileHandler
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.io.InputStream openStream() throws java.io.IOException
VirtualFileHandler
openStream
in interface VirtualFileHandler
java.io.IOException
- for any problem accessing the virtual file systempublic 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 AssembledDirectory getVirtualFile()
VirtualFileHandler
getVirtualFile
in interface VirtualFileHandler
getVirtualFile
in class AbstractVirtualFileHandler
public java.net.URL toURL() throws java.net.MalformedURLException, java.net.URISyntaxException
VirtualFileHandler
toURL
in interface VirtualFileHandler
toURL
in class AbstractVirtualFileHandler
java.net.MalformedURLException
- for any error
java.net.URISyntaxException
- for an error parsing the URIprotected 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 |