|
||||||||||
| 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.zip.ZipEntryHandler
public class ZipEntryHandler
Handler representing an individual file (ZipEntry) within ZipEntryContext
| Field Summary |
|---|
| Fields inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
|---|
cachedLastModified, log |
| Constructor Summary | |
|---|---|
ZipEntryHandler(ZipEntryContext context,
AbstractVirtualFileHandler parent,
String name,
boolean isLeaf)
Create a new ZipEntryHandler. |
|
| Method Summary | |
|---|---|
void |
cleanup()
Cleanup resources. |
VirtualFileHandler |
createChildHandler(String name)
Create a virtual file context |
boolean |
delete(int gracePeriod)
Delete the file represented by this handler. |
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 |
URL |
getRealURL()
Get a file: or jar:file: URL representing a resource as precisely as possible. |
long |
getSize()
Get the size |
protected void |
internalReplaceChild(VirtualFileHandler original,
VirtualFileHandler replacement)
Replace original child with unpacked replacement. |
boolean |
isArchive()
Does this represent an archive. |
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 |
protected URL |
toInternalVfsUrl()
Get internal representation of vfs url. |
URI |
toURI()
Get the VF URI (file://root/org/jboss/X.java) |
| Methods inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
|---|
checkClosed, checkParentExists, close, decrement, doClose, equals, getChildPathName, getChildVfsUrl, getLocalPathName, getLocalVFSContext, getName, getParent, getPathName, getReferences, getVFSContext, getVfsUrl, getVirtualFile, hasBeenModified, hashCode, increment, isTemporary, replaceChild, setPathName, setVfsUrl, simpleFindChild, structuredFindChild, toString, toStringLocal, toURL, toVfsUrl |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ZipEntryHandler(ZipEntryContext context,
AbstractVirtualFileHandler parent,
String name,
boolean isLeaf)
throws IOException
context - ZipEntryContextparent - parent within the same contextname - name of this file within contextisLeaf - true if this file should have a URL not ending with '/', false otherwise
IOException - for any error| Method Detail |
|---|
public URI toURI()
throws URISyntaxException
VirtualFileHandler
toURI in interface VirtualFileHandlerURISyntaxException - for an error parsing the URI
public long getLastModified()
throws IOException
VirtualFileHandler
getLastModified in interface VirtualFileHandlerIOException - for any problem accessing the virtual file system
public long getSize()
throws IOException
VirtualFileHandler
getSize in interface VirtualFileHandlerIOException - for any problem accessing the virtual file system
public boolean exists()
throws IOException
VirtualFileHandler
exists in interface VirtualFileHandlerIOException - - thrown on failure to detect existence.
public boolean isLeaf()
throws IOException
VirtualFileHandler
isLeaf in interface VirtualFileHandlerIOException - for any problem accessing the virtual file system
public boolean isArchive()
throws IOException
VirtualFileHandler
isArchive in interface VirtualFileHandlerisArchive in class AbstractVirtualFileHandlerIOException - for any problem accessing the virtual file system
public boolean isHidden()
throws IOException
VirtualFileHandler
isHidden in interface VirtualFileHandlerIOException - for any problem accessing the virtual file system
public boolean isNested()
throws IOException
VirtualFileHandler
isNested in interface VirtualFileHandlerIOException - for any error
public InputStream openStream()
throws IOException
VirtualFileHandler
openStream in interface VirtualFileHandlerIOException - 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 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 occurspublic void cleanup()
VirtualFileHandler
cleanup in interface VirtualFileHandlercleanup in class AbstractVirtualFileHandler
public boolean delete(int gracePeriod)
throws IOException
AbstractVirtualFileHandlerVirtualFileHandler.removeChild(String) of the parent
delete in interface VirtualFileHandlerdelete in class AbstractVirtualFileHandlergracePeriod - max time to wait for any locks
IOException - if an error occurs
public VirtualFileHandler createChildHandler(String name)
throws IOException
StructuredVirtualFileHandler
createChildHandler in interface StructuredVirtualFileHandlername - the name
IOException - for any error accessing the virtual file system
protected void internalReplaceChild(VirtualFileHandler original,
VirtualFileHandler replacement)
AbstractVirtualFileHandler
internalReplaceChild in class AbstractVirtualFileHandleroriginal - the originalreplacement - the replacementprotected URL toInternalVfsUrl()
AbstractVirtualFileHandler
toInternalVfsUrl in class AbstractVirtualFileHandler
public URL getRealURL()
throws IOException,
URISyntaxException
VirtualFileHandler
getRealURL in interface VirtualFileHandlergetRealURL in class AbstractVirtualFileHandlerMalformedURLException - for any error constructing the URL
URISyntaxException - for an error parsing the URI
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||