org.jboss.virtual.plugins.context.jar
Class NoCopyNestedJarHandler

java.lang.Object
  extended by org.jboss.virtual.plugins.context.AbstractVirtualFileHandler
      extended by org.jboss.virtual.plugins.context.AbstractURLHandler
          extended by org.jboss.virtual.plugins.context.jar.AbstractJarHandler
              extended by org.jboss.virtual.plugins.context.jar.NoCopyNestedJarHandler
All Implemented Interfaces:
Serializable, VirtualFileHandler

public class NoCopyNestedJarHandler
extends AbstractJarHandler

Nested Jar Handler.

Version:
$Revision: 1.1 $
Author:
Ales Justin, Adrian Brock
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler
cachedLastModified, log
 
Constructor Summary
NoCopyNestedJarHandler(VFSContext context, VirtualFileHandler parent, JarFile parentJar, ZipEntry entry, URL url, String entryName)
          Create a new NestedJarHandler.
 
Method Summary
 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()
           
 InputStream openStream()
          Access the file contents.
 
Methods inherited from class org.jboss.virtual.plugins.context.jar.AbstractJarHandler
fromURL, getEntry, getJar, getURL, handleJarFile, isLeaf
 
Methods inherited from class org.jboss.virtual.plugins.context.AbstractURLHandler
exists, getURL, isHidden, toURI, toURL
 
Methods inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler
checkClosed, checkParentExists, close, decrement, doClose, equals, getChildPathName, getChildVfsUrl, getName, getParent, getPathName, getVFSContext, getVfsUrl, getVirtualFile, hasBeenModified, hashCode, increment, setPathName, setVfsUrl, simpleFindChild, structuredFindChild, toString, toVfsUrl
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NoCopyNestedJarHandler

public NoCopyNestedJarHandler(VFSContext context,
                              VirtualFileHandler parent,
                              JarFile parentJar,
                              ZipEntry entry,
                              URL url,
                              String entryName)
                       throws IOException
Create a new NestedJarHandler.

Parameters:
context - the context
parent - the parent
parentJar - the parent jar file
entry - the jar entry
url - the url
entryName - the entry name
Throws:
IOException - for an error accessing the file system
IllegalArgumentException - for a null context, url or vfsPath
Method Detail

initCacheLastModified

protected void initCacheLastModified()
Overrides:
initCacheLastModified in class AbstractURLHandler

getLastModified

public long getLastModified()
                     throws IOException
Description copied from interface: VirtualFileHandler
When the file was last modified

Specified by:
getLastModified in interface VirtualFileHandler
Overrides:
getLastModified in class AbstractURLHandler
Returns:
the last modified time
Throws:
IOException - for any problem accessing the virtual file system

getSize

public long getSize()
             throws IOException
Description copied from interface: VirtualFileHandler
Get the size

Specified by:
getSize in interface VirtualFileHandler
Overrides:
getSize in class AbstractURLHandler
Returns:
the size
Throws:
IOException - for any problem accessing the virtual file system

openStream

public InputStream openStream()
                       throws IOException
Description copied from interface: VirtualFileHandler
Access the file contents.

Specified by:
openStream in interface VirtualFileHandler
Overrides:
openStream in class AbstractURLHandler
Returns:
An InputStream for the file contents.
Throws:
IOException - for any problem accessing the virtual file system

getChild

public VirtualFileHandler getChild(String path)
                            throws IOException
Description copied from interface: VirtualFileHandler
Get a child

Parameters:
path - the path
Returns:
the child or null if not found
Throws:
IOException - for an error accessing the file system

getChildren

public List<VirtualFileHandler> getChildren(boolean ignoreErrors)
                                     throws IOException
Description copied from interface: VirtualFileHandler
Get the children

Parameters:
ignoreErrors - whether to ignore errors
Returns:
the children
Throws:
IOException - for an error accessing the file system


Copyright © 2008 JBoss, A division of Red Hat, Inc. All Rights Reserved.