org.jboss.virtual.plugins.context.jar
Class JarHandler
java.lang.Object
org.jboss.virtual.plugins.context.AbstractVirtualFileHandler
org.jboss.virtual.plugins.context.AbstractURLHandler
org.jboss.virtual.plugins.context.jar.AbstractJarHandler
org.jboss.virtual.plugins.context.jar.AbstractStructuredJarHandler<Object>
org.jboss.virtual.plugins.context.jar.JarHandler
- All Implemented Interfaces:
- Serializable, StructuredVirtualFileHandler, VirtualFileHandler
public class JarHandler
- extends AbstractStructuredJarHandler<Object>
JarHandler.
- Version:
- $Revision: 1.1 $
- Author:
- Adrian Brock, Ales Justin
- See Also:
- Serialized Form
Method Summary |
boolean |
delete(int gracePeriod)
Delete the file represented by this handler. |
boolean |
isNested()
Are we nested in some archive. |
boolean |
removeChild(String path)
Remove a child |
Methods inherited from class org.jboss.virtual.plugins.context.jar.AbstractStructuredJarHandler |
buildParents, createChildHandler, createSynthenticParent, createVirtualFileHandler, extraWrapperInfo, getChild, getChildren, initJarFile, initJarFile, internalReplaceChild, isArchive |
Methods inherited from class org.jboss.virtual.plugins.context.AbstractURLHandler |
exists, getLastModified, getSize, getURL, initCacheLastModified, isHidden, openConnection, openConnection, openStream, 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, isTemporary, replaceChild, setPathName, setVfsUrl, simpleFindChild, structuredFindChild, toInternalVfsUrl, toString, toStringLocal, toVfsUrl |
JarHandler
public JarHandler(VFSContext context,
VirtualFileHandler parent,
URL url,
String name)
throws IOException
- Create a new JarHandler.
- Parameters:
context
- the contextparent
- the parenturl
- the urlname
- the name
- Throws:
IOException
- for an error accessing the file system
IllegalArgumentException
- for a null context, url or vfsPath
JarHandler
public JarHandler(VFSContext context,
VirtualFileHandler parent,
File file,
URL url,
String name)
throws IOException
- Throws:
IOException
removeChild
public boolean removeChild(String path)
throws IOException
- Description copied from interface:
VirtualFileHandler
- Remove a child
- Parameters:
path
- child name
- Returns:
- true if child was removed, false otherwise
- Throws:
IOException
- if an error occurs
delete
public boolean delete(int gracePeriod)
throws IOException
- Description copied from class:
AbstractVirtualFileHandler
- Delete the file represented by this handler.
File deletion is comprised of two parts:
- physical file deletion - performed by this method or its override
- removal of any child references from the parent - performed by
VirtualFileHandler.removeChild(String)
of the parent
This method doesn't do any physical file removal because it has no concept of underlying physical file.
An implementation that does physical file removal should override this method and call super.delete() at the end.
- Specified by:
delete
in interface VirtualFileHandler
- Overrides:
delete
in class AbstractVirtualFileHandler
- Parameters:
gracePeriod
- max time to wait for any locks
- Returns:
- true if file was deleted, false otherwise
- Throws:
IOException
- if an error occurs
isNested
public boolean isNested()
throws IOException
- Description copied from interface:
VirtualFileHandler
- Are we nested in some archive.
- Returns:
- true if this is archive entry
- Throws:
IOException
- for any error
Copyright © 2010 JBoss, A division of Red Hat, Inc. All Rights Reserved.