|
||||||||||
| 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.jar.NestedJarFromStream
public class NestedJarFromStream
A nested jar implementation used to represent a jar within a jar.
| Nested Class Summary | |
|---|---|
static class |
NestedJarFromStream.JarEntryContents
|
| Field Summary |
|---|
| Fields inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
|---|
cachedLastModified, log, vfsUrl |
| Constructor Summary | |
|---|---|
NestedJarFromStream(VFSContext context,
VirtualFileHandler parent,
ZipInputStream zis,
URL jarURL,
ZipEntry entry)
Create a nested jar from the parent zip inputstream/zip entry. |
|
| Method Summary | |
|---|---|
void |
close()
Close the resources |
boolean |
exists()
TODO: removing the entry/jar that resulted in this needs to be detected. |
VirtualFileHandler |
findChild(String path)
Find a child |
List<VirtualFileHandler> |
getChildren(boolean ignoreErrors)
Get the children |
byte[] |
getContents(String name)
|
Iterator<NestedJarFromStream.JarEntryContents> |
getEntries()
|
NestedJarFromStream.JarEntryContents |
getEntry(String name)
|
ZipEntry |
getJarEntry(String name)
|
long |
getLastModified()
When the file was last modified |
String |
getName()
Get the simple VF name (X.java) |
String |
getPathName()
Get the VFS relative path name (org/jboss/X.java) |
long |
getSize()
Get the size |
protected void |
init()
|
boolean |
isHidden()
Whether it is hidden |
boolean |
isLeaf()
Whether it is a simple leaf of the VFS, i.e. |
InputStream |
openStream()
Access the file contents. |
String |
toString()
|
URI |
toURI()
Get the VF URI (file://root/org/jboss/X.java) |
| Methods inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
|---|
checkClosed, decrement, doClose, equals, getParent, getVFSContext, getVirtualFile, hasBeenModified, hashCode, increment, setPathName, simpleFindChild, structuredFindChild, toURL, toVfsUrl |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NestedJarFromStream(VFSContext context,
VirtualFileHandler parent,
ZipInputStream zis,
URL jarURL,
ZipEntry entry)
context - - the context containing the jarparent - - the jar handler for this nested jarzis - - the jar zip input streamjarURL - - the URL to use as the jar URLentry - - the parent jar ZipEntry for the nested jar| Method Detail |
|---|
public VirtualFileHandler findChild(String path)
throws IOException
VirtualFileHandler
path - the path
IOException - for an error accessing the file system (or the child doesn't exist)
public List<VirtualFileHandler> getChildren(boolean ignoreErrors)
throws IOException
VirtualFileHandler
ignoreErrors - whether to ignore errors
IOException - for an error accessing the file system
public boolean exists()
throws IOException
IOException - - thrown on failure to detect existence.
public boolean isLeaf()
throws IOException
VirtualFileHandler
IOException - for any problem accessing the virtual file systempublic boolean isHidden()
VirtualFileHandler
public long getSize()
VirtualFileHandler
public long getLastModified()
throws IOException
VirtualFileHandler
IOException - for any problem accessing the virtual file system
public Iterator<NestedJarFromStream.JarEntryContents> getEntries()
throws IOException
IOException
public NestedJarFromStream.JarEntryContents getEntry(String name)
throws IOException
IOException
public ZipEntry getJarEntry(String name)
throws IOException
IOException
public byte[] getContents(String name)
throws IOException
IOExceptionpublic String getName()
VirtualFileHandler
getName in interface VirtualFileHandlergetName in class AbstractVirtualFileHandlerpublic String getPathName()
VirtualFileHandler
getPathName in interface VirtualFileHandlergetPathName in class AbstractVirtualFileHandler
public InputStream openStream()
throws IOException
VirtualFileHandler
IOException - for any problem accessing the virtual file systempublic void close()
VirtualFileHandler
close in interface VirtualFileHandlerclose in class AbstractVirtualFileHandler
public URI toURI()
throws URISyntaxException
VirtualFileHandler
URISyntaxException - for an error parsing the URIpublic String toString()
toString in class AbstractVirtualFileHandler
protected void init()
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||