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

java.lang.Object
  extended by org.jboss.virtual.plugins.context.AbstractVFSContext
      extended by org.jboss.virtual.plugins.context.jar.JarContext
All Implemented Interfaces:
VFSContext

public class JarContext
extends AbstractVFSContext

JarContext.

Version:
$Revision: 1.1 $
Author:
Scott.Stark@jboss.org, Adrian Brock

Field Summary
 
Fields inherited from class org.jboss.virtual.plugins.context.AbstractVFSContext
log
 
Constructor Summary
JarContext(URL rootURL)
          Create a new JarContext.
 
Method Summary
protected  VirtualFileHandler createVirtualFileHandler(VirtualFileHandler parent, URL url)
          Create a new virtual file handler
static String entryPath(String entryName)
           
static String extractJarName(String urlStr)
          Extract jar name.
protected  void finalize()
           
 String getName()
          Get the name.
 VirtualFileHandler getRoot()
          Return the root virtual file
 
Methods inherited from class org.jboss.virtual.plugins.context.AbstractVFSContext
addTempInfo, cleanupTempInfo, createNewOptions, equals, getChild, getChildren, getChildURL, getConstraints, getExceptionHandler, getFurthestParentTemp, getOption, getOption, getOption, getOptions, getPeerContext, getRootPeer, getRootURI, getTempInfo, getTempInfos, getVFS, hashCode, setExceptionHandler, setOption, setOptionsToURL, setRootPeer, toString, visit, visit
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JarContext

public JarContext(URL rootURL)
           throws IOException,
                  URISyntaxException
Create a new JarContext.

Parameters:
rootURL - the root url
Throws:
IOException - for an error accessing the file system
URISyntaxException - for an error parsing the URI
Method Detail

getName

public String getName()
Description copied from interface: VFSContext
Get the name.

Returns:
the name

getRoot

public VirtualFileHandler getRoot()
                           throws IOException
Description copied from interface: VFSContext
Return the root virtual file

Returns:
the root
Throws:
IOException - for any problem accessing the VFS

createVirtualFileHandler

protected VirtualFileHandler createVirtualFileHandler(VirtualFileHandler parent,
                                                      URL url)
                                               throws IOException
Create a new virtual file handler

Parameters:
parent - the parent
url - the url
Returns:
the handler
Throws:
IOException - for any error accessing the file system
IllegalArgumentException - for a null entry or url

entryPath

public static String entryPath(String entryName)

extractJarName

public static String extractJarName(String urlStr)
Extract jar name.

Parameters:
urlStr - the url string
Returns:
jar name

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable


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