|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.virtual.plugins.context.AbstractVirtualFileHandler
public abstract class AbstractVirtualFileHandler
AbstractVirtualFileHandler.
Field Summary | |
---|---|
protected long |
cachedLastModified
|
protected org.jboss.logging.Logger |
log
The log |
protected java.net.URL |
vfsUrl
|
Constructor Summary | |
---|---|
protected |
AbstractVirtualFileHandler(VFSContext context,
VirtualFileHandler parent,
java.lang.String name)
Create a new handler |
Method Summary | |
---|---|
protected void |
checkClosed()
Check whether we are closed |
void |
close()
Close the resources |
protected void |
doClose()
The real close |
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getName()
Get the simple VF name (X.java) |
VirtualFileHandler |
getParent()
Get the parent |
java.lang.String |
getPathName()
Get the VFS relative path name (org/jboss/X.java) |
VFSContext |
getVFSContext()
Get the VFSContext this file belongs to |
VirtualFile |
getVirtualFile()
Get the virtual file wrapper |
boolean |
hasBeenModified()
Returns true if the file has been modified since this method was last called Last modified time is initialized at handler instantiation. |
int |
hashCode()
|
VirtualFileHandler |
simpleFindChild(java.lang.String path)
Simple implementation of findChild |
VirtualFileHandler |
structuredFindChild(java.lang.String path)
Structured implementation of find child |
java.lang.String |
toString()
|
java.net.URL |
toURL()
Get the VF URL (file://root/org/jboss/X.java) |
java.net.URL |
toVfsUrl()
Get a VFS-based URL |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jboss.virtual.spi.VirtualFileHandler |
---|
findChild, getChildren, getLastModified, getSize, isHidden, isLeaf, openStream, toURI |
Field Detail |
---|
protected org.jboss.logging.Logger log
protected java.net.URL vfsUrl
protected transient long cachedLastModified
Constructor Detail |
---|
protected AbstractVirtualFileHandler(VFSContext context, VirtualFileHandler parent, java.lang.String name)
context
- the contextparent
- the parentname
- the name
java.lang.IllegalArgumentException
- if the context or name is null;Method Detail |
---|
public boolean hasBeenModified() throws java.io.IOException
VirtualFileHandler
hasBeenModified
in interface VirtualFileHandler
java.io.IOException
public java.lang.String getName()
VirtualFileHandler
getName
in interface VirtualFileHandler
public java.lang.String getPathName()
VirtualFileHandler
getPathName
in interface VirtualFileHandler
public java.net.URL toURL() throws java.net.MalformedURLException, java.net.URISyntaxException
VirtualFileHandler
toURL
in interface VirtualFileHandler
java.net.MalformedURLException
- for any error
java.net.URISyntaxException
- for an error parsing the URIpublic java.net.URL toVfsUrl() throws java.net.MalformedURLException, java.net.URISyntaxException
VirtualFileHandler
toVfsUrl
in interface VirtualFileHandler
java.net.MalformedURLException
java.net.URISyntaxException
public VirtualFile getVirtualFile()
VirtualFileHandler
getVirtualFile
in interface VirtualFileHandler
public VirtualFileHandler getParent() throws java.io.IOException
VirtualFileHandler
getParent
in interface VirtualFileHandler
java.io.IOException
- for an error accessing the file systempublic VFSContext getVFSContext()
VirtualFileHandler
getVFSContext
in interface VirtualFileHandler
protected void checkClosed() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- when closedpublic void close()
VirtualFileHandler
close
in interface VirtualFileHandler
protected void doClose()
public VirtualFileHandler structuredFindChild(java.lang.String path) throws java.io.IOException
path
- the path
java.io.IOException
- for any error accessing the virtual file system
java.lang.IllegalArgumentException
- for a null namepublic VirtualFileHandler simpleFindChild(java.lang.String path) throws java.io.IOException
path
- the path
java.io.IOException
- for any error accessing the virtual file system
java.lang.IllegalArgumentException
- for a null namepublic java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |