|
||||||||||
| 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.SynthenticDirEntryHandler
public class SynthenticDirEntryHandler
SynthenticDirEntryHandler represents non-existent directory jar entry.
| Field Summary |
|---|
| Fields inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
|---|
cachedLastModified, log |
| Constructor Summary | |
|---|---|
SynthenticDirEntryHandler(VFSContext context,
VirtualFileHandler parent,
String entryName,
long lastModified,
URL url)
Create a new SynthenticDirEntryHandler. |
|
| Method Summary | |
|---|---|
void |
addChild(VirtualFileHandler child)
Add a child to an entry |
VirtualFileHandler |
createChildHandler(String name)
Create a child handler for the given name. |
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. |
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 |
protected void |
initCacheLastModified()
|
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. |
InputStream |
openStream()
Access the file contents. |
boolean |
removeChild(String name)
Remove a child |
| Methods inherited from class org.jboss.virtual.plugins.context.AbstractURLHandler |
|---|
getURL, openConnection, openConnection, toURI, toURL |
| Methods inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
|---|
checkClosed, checkParentExists, cleanup, close, decrement, doClose, equals, getChildPathName, getChildVfsUrl, getLocalPathName, getLocalVFSContext, getName, getParent, getPathName, getRealURL, getReferences, getVFSContext, getVfsUrl, getVirtualFile, 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 SynthenticDirEntryHandler(VFSContext context,
VirtualFileHandler parent,
String entryName,
long lastModified,
URL url)
throws IOException
context - the contextparent - the parententryName - - the simple name for the dirlastModified - the timestamp for the dirurl - the full url
IOException - for an error accessing the file system
IllegalArgumentException - for a null context, url, jar or entry| Method Detail |
|---|
protected void initCacheLastModified()
initCacheLastModified in class AbstractURLHandlerpublic void addChild(VirtualFileHandler child)
addChild in interface HierarchyVirtualFileHandlerchild - the child file handler
public long getLastModified()
throws IOException
VirtualFileHandler
getLastModified in interface VirtualFileHandlergetLastModified in class AbstractURLHandlerIOException - for any problem accessing the virtual file systempublic long getSize()
VirtualFileHandler
getSize in interface VirtualFileHandlergetSize in class AbstractURLHandler
public boolean exists()
throws IOException
exists in interface VirtualFileHandlerexists in class AbstractURLHandlerIOException - - thrown on failure to detect existence.URLConnection.getLastModified(),
org.jboss.test.virtual.test.URLExistsUnitTestCasepublic boolean isLeaf()
VirtualFileHandler
isLeaf in interface VirtualFileHandlerpublic boolean isHidden()
VirtualFileHandler
isHidden in interface VirtualFileHandlerisHidden in class AbstractURLHandler
public boolean isNested()
throws IOException
VirtualFileHandler
isNested in interface VirtualFileHandlerIOException - for any errorpublic boolean delete(int gracePeriod)
AbstractVirtualFileHandlerVirtualFileHandler.removeChild(String) of the parent
delete in interface VirtualFileHandlerdelete in class AbstractVirtualFileHandlergracePeriod - max time to wait for any locks
public InputStream openStream()
throws IOException
VirtualFileHandler
openStream in interface VirtualFileHandleropenStream in class AbstractURLHandlerIOException - for any problem accessing the virtual file system
public List<VirtualFileHandler> getChildren(boolean ignoreErrors)
throws IOException
VirtualFileHandler
getChildren in interface VirtualFileHandlerignoreErrors - whether to ignore errors
IOException - for an error accessing the file system
public VirtualFileHandler createChildHandler(String name)
throws IOException
createChildHandler in interface StructuredVirtualFileHandlername - - the simple name of an immeadiate child.
IOException - - thrown if there are no children or the
name does not match a child
public VirtualFileHandler getChild(String path)
throws IOException
VirtualFileHandler
getChild in interface VirtualFileHandlerpath - the path
null if not found
IOException - for an error accessing the file system
public boolean removeChild(String name)
throws IOException
VirtualFileHandler
removeChild in interface VirtualFileHandlername - child name
IOException - if an error occurs
protected void internalReplaceChild(VirtualFileHandler original,
VirtualFileHandler replacement)
AbstractVirtualFileHandler
internalReplaceChild in class AbstractVirtualFileHandleroriginal - the originalreplacement - the replacement
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||