|
||||||||||
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.DelegatingHandler
public class DelegatingHandler
A delegating VirtualFileHandler that allows for overriding the delegate parent and name. One usecase is a link which roots another VFSContext under a different parent and name.
Field Summary |
---|
Fields inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
---|
cachedLastModified, log, vfsUrl |
Constructor Summary | |
---|---|
DelegatingHandler(VFSContext context,
VirtualFileHandler parent,
java.lang.String name,
VirtualFileHandler delegate)
Create a DelegatingHandler |
Method Summary | |
---|---|
VirtualFileHandler |
findChild(java.lang.String path)
Find 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 |
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. |
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, close, doClose, equals, getName, getParent, getPathName, getVFSContext, getVirtualFile, hasBeenModified, hashCode, simpleFindChild, structuredFindChild, toString, toVfsUrl |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DelegatingHandler(VFSContext context, VirtualFileHandler parent, java.lang.String name, VirtualFileHandler delegate)
context
- - the context for the parentparent
- - the parent of the delegate in this VFSname
- - the name of the delegate in this VFSdelegate
- - the handler delegateMethod Detail |
---|
public VirtualFileHandler findChild(java.lang.String path) throws java.io.IOException
VirtualFileHandler
path
- the path
java.io.IOException
- for an error accessing the file system (or the child doesn't exist)public java.util.List<VirtualFileHandler> getChildren(boolean ignoreErrors) throws java.io.IOException
VirtualFileHandler
ignoreErrors
- whether to ignore errors
java.io.IOException
- for an error accessing the file systempublic long getLastModified() throws java.io.IOException
VirtualFileHandler
java.io.IOException
- for any problem accessing the virtual file systempublic long getSize() throws java.io.IOException
VirtualFileHandler
java.io.IOException
- for any problem accessing the virtual file systempublic boolean isLeaf() throws java.io.IOException
VirtualFileHandler
java.io.IOException
- for any problem accessing the virtual file systempublic boolean isHidden() throws java.io.IOException
VirtualFileHandler
java.io.IOException
- for any problem accessing the virtual file systempublic java.io.InputStream openStream() throws java.io.IOException
VirtualFileHandler
java.io.IOException
- for any problem accessing the virtual file systempublic java.net.URI toURI() throws java.net.URISyntaxException
VirtualFileHandler
java.net.URISyntaxException
- for an error parsing the URIpublic java.net.URL toURL() throws java.net.URISyntaxException, java.net.MalformedURLException
VirtualFileHandler
toURL
in interface VirtualFileHandler
toURL
in class AbstractVirtualFileHandler
java.net.URISyntaxException
- for an error parsing the URI
java.net.MalformedURLException
- for any error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |