org.mortbay.resource
Class JarResource

java.lang.Object
  extended byorg.mortbay.resource.Resource
      extended byorg.mortbay.resource.URLResource
          extended byorg.mortbay.resource.JarResource
All Implemented Interfaces:
Serializable

public class JarResource
extends URLResource

See Also:
Serialized Form

Field Summary
protected  JarURLConnection _jarConnection
           
 
Fields inherited from class org.mortbay.resource.URLResource
_connection, _in, _url, _urlString
 
Fields inherited from class org.mortbay.resource.Resource
__defaultUseCaches
 
Method Summary
protected  boolean checkConnection()
           
 boolean exists()
          Returns true if the respresenetd resource exists.
 void extract(File directory, boolean deleteOnExit)
           
static void extract(Resource resource, File directory, boolean deleteOnExit)
           
 File getFile()
          Returns an File representing the given resource or NULL if this is not possible.
 InputStream getInputStream()
          Returns an input stream to the resource
protected  void newConnection()
           
 void release()
          Release any resources held by the resource.
 
Methods inherited from class org.mortbay.resource.URLResource
addPath, delete, equals, getName, getOutputStream, getURL, getUseCaches, hashCode, isDirectory, lastModified, length, list, renameTo, toString
 
Methods inherited from class org.mortbay.resource.Resource
encode, finalize, getAlias, getAssociate, getDefaultUseCaches, getListHTML, newResource, newResource, newResource, newResource, newSystemResource, setAssociate, setDefaultUseCaches, writeTo
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_jarConnection

protected transient JarURLConnection _jarConnection
Method Detail

release

public void release()
Description copied from class: URLResource
Release any resources held by the resource.

Overrides:
release in class URLResource

checkConnection

protected boolean checkConnection()
Overrides:
checkConnection in class URLResource

newConnection

protected void newConnection()
                      throws IOException
Throws:
IOException - Sub-classes of JarResource may throw an IOException (or subclass)

exists

public boolean exists()
Returns true if the respresenetd resource exists.

Overrides:
exists in class URLResource

getFile

public File getFile()
             throws IOException
Description copied from class: URLResource
Returns an File representing the given resource or NULL if this is not possible.

Overrides:
getFile in class URLResource
Throws:
IOException

getInputStream

public InputStream getInputStream()
                           throws IOException
Description copied from class: URLResource
Returns an input stream to the resource

Overrides:
getInputStream in class URLResource
Throws:
IOException

extract

public static void extract(Resource resource,
                           File directory,
                           boolean deleteOnExit)
                    throws IOException
Throws:
IOException

extract

public void extract(File directory,
                    boolean deleteOnExit)
             throws IOException
Throws:
IOException