org.eclipse.jetty.util.resource
Class JarResource

java.lang.Object
  extended by org.eclipse.jetty.util.resource.Resource
      extended by org.eclipse.jetty.util.resource.URLResource
          extended by org.eclipse.jetty.util.resource.JarResource
All Implemented Interfaces:
ResourceFactory

public class JarResource
extends URLResource


Field Summary
protected  JarURLConnection _jarConnection
           
 
Fields inherited from class org.eclipse.jetty.util.resource.URLResource
_connection, _in, _url, _urlString
 
Fields inherited from class org.eclipse.jetty.util.resource.Resource
__defaultUseCaches
 
Method Summary
protected  boolean checkConnection()
           
 void copyTo(File directory)
           
 boolean exists()
          Returns true if the respresenetd resource exists.
 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()
           
static Resource newJarResource(Resource resource)
           
 void release()
          Release any resources held by the resource.
 
Methods inherited from class org.eclipse.jetty.util.resource.URLResource
addPath, delete, equals, getName, getOutputStream, getURL, getUseCaches, hashCode, isContainedIn, isDirectory, lastModified, length, list, renameTo, toString
 
Methods inherited from class org.eclipse.jetty.util.resource.Resource
encode, finalize, getAlias, getAssociate, getDefaultUseCaches, getListHTML, getResource, getURI, isContainedIn, newClassPathResource, newClassPathResource, 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 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

copyTo

public void copyTo(File directory)
            throws IOException
Overrides:
copyTo in class Resource
Throws:
IOException

newJarResource

public static Resource newJarResource(Resource resource)
                               throws IOException
Throws:
IOException


Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.