|
||||||||||
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,
java.util.zip.ZipInputStream zis,
java.net.URL jarURL,
java.util.zip.ZipEntry entry)
Create a nested jar from the parent zip inputstream/zip entry. |
Method Summary | |
---|---|
void |
close()
Close the resources |
VirtualFileHandler |
findChild(java.lang.String path)
Find a child |
java.util.List<VirtualFileHandler> |
getChildren(boolean ignoreErrors)
Get the children |
byte[] |
getContents(java.lang.String name)
|
java.util.Iterator<NestedJarFromStream.JarEntryContents> |
getEntries()
|
NestedJarFromStream.JarEntryContents |
getEntry(java.lang.String name)
|
java.util.zip.ZipEntry |
getJarEntry(java.lang.String name)
|
long |
getLastModified()
When the file was last modified |
java.lang.String |
getName()
Get the simple VF name (X.java) |
java.lang.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. |
java.io.InputStream |
openStream()
Access the file contents. |
java.lang.String |
toString()
|
java.net.URI |
toURI()
Get the VF URI (file://root/org/jboss/X.java) |
Methods inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
---|
checkClosed, doClose, equals, getParent, getVFSContext, getVirtualFile, hasBeenModified, hashCode, 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, java.util.zip.ZipInputStream zis, java.net.URL jarURL, java.util.zip.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 jarMethod Detail |
---|
public VirtualFileHandler findChild(java.lang.String path) throws java.io.IOException
VirtualFileHandler
path
- the path
java.io.IOException
- for an error accessing the file system (or the child doesn't exist)public java.util.List<VirtualFileHandler> getChildren(boolean ignoreErrors) throws java.io.IOException
VirtualFileHandler
ignoreErrors
- whether to ignore errors
java.io.IOException
- for an error accessing the file systempublic boolean isLeaf() throws java.io.IOException
VirtualFileHandler
java.io.IOException
- for any problem accessing the virtual file systempublic boolean isHidden()
VirtualFileHandler
public long getSize()
VirtualFileHandler
public long getLastModified() throws java.io.IOException
VirtualFileHandler
java.io.IOException
- for any problem accessing the virtual file systempublic java.util.Iterator<NestedJarFromStream.JarEntryContents> getEntries() throws java.io.IOException
java.io.IOException
public NestedJarFromStream.JarEntryContents getEntry(java.lang.String name) throws java.io.IOException
java.io.IOException
public java.util.zip.ZipEntry getJarEntry(java.lang.String name) throws java.io.IOException
java.io.IOException
public byte[] getContents(java.lang.String name) throws java.io.IOException
java.io.IOException
public java.lang.String getName()
VirtualFileHandler
getName
in interface VirtualFileHandler
getName
in class AbstractVirtualFileHandler
public java.lang.String getPathName()
VirtualFileHandler
getPathName
in interface VirtualFileHandler
getPathName
in class AbstractVirtualFileHandler
public java.io.InputStream openStream() throws java.io.IOException
VirtualFileHandler
java.io.IOException
- for any problem accessing the virtual file systempublic void close()
VirtualFileHandler
close
in interface VirtualFileHandler
close
in class AbstractVirtualFileHandler
public java.net.URI toURI() throws java.net.URISyntaxException
VirtualFileHandler
java.net.URISyntaxException
- for an error parsing the URIpublic java.lang.String toString()
toString
in class AbstractVirtualFileHandler
protected void init() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |