|
||||||||||
| 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 |
| Constructor Summary | |
|---|---|
DelegatingHandler(VFSContext context,
VirtualFileHandler parent,
String name,
VirtualFileHandler delegate)
Create a DelegatingHandler |
|
| Method Summary | |
|---|---|
boolean |
exists()
Tests whether the underlying implementation file still exists. |
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 |
isHidden()
Whether it is hidden |
boolean |
isLeaf()
Whether it is a simple leaf of the VFS, i.e. whether it can contain other files |
InputStream |
openStream()
Access the file contents. |
URI |
toURI()
Get the VF URI (file://root/org/jboss/X.java) |
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, doClose, equals, getChildPathName, getChildVfsUrl, getName, getParent, getPathName, getVFSContext, getVfsUrl, getVirtualFile, hasBeenModified, hashCode, increment, setPathName, setVfsUrl, 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,
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 delegate| Method Detail |
|---|
public VirtualFileHandler getChild(String path)
throws IOException
VirtualFileHandler
path - the path
null if not found
IOException - for an error accessing the file system
public List<VirtualFileHandler> getChildren(boolean ignoreErrors)
throws IOException
VirtualFileHandler
ignoreErrors - whether to ignore errors
IOException - for an error accessing the file system
public long getLastModified()
throws IOException
VirtualFileHandler
IOException - for any problem accessing the virtual file system
public long getSize()
throws IOException
VirtualFileHandler
IOException - for any problem accessing the virtual file system
public boolean isLeaf()
throws IOException
VirtualFileHandler
IOException - for any problem accessing the virtual file system
public boolean exists()
throws IOException
VirtualFileHandler
IOException - - thrown on failure to detect existence.
public boolean isHidden()
throws IOException
VirtualFileHandler
IOException - for any problem accessing the virtual file system
public InputStream openStream()
throws IOException
VirtualFileHandler
IOException - for any problem accessing the virtual file system
public URI toURI()
throws URISyntaxException
VirtualFileHandler
URISyntaxException - for an error parsing the URI
public URL toURL()
throws URISyntaxException,
MalformedURLException
VirtualFileHandler
toURL in interface VirtualFileHandlertoURL in class AbstractVirtualFileHandlerURISyntaxException - for an error parsing the URI
MalformedURLException - for any error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||