## org.eclipse.jetty.util.resource
Class JarResource

    java.lang.Object
      org.eclipse.jetty.util.resource.Resource
          org.eclipse.jetty.util.resource.URLResource
              org.eclipse.jetty.util.resource.JarResource

All Implemented Interfaces:
  ResourceFactory

    public class JarResource

extends URLResource

Field Summary
`protected java.net.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(java.io.File directory)`
`boolean` `exists()` Returns true if the respresenetd resource exists.
`java.io.File` `getFile()` Returns an File representing the given resource or NULL if this is not possible.
`java.io.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 java.net.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 java.io.IOException

  Throws:
    `java.io.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 java.io.File getFile()
                         throws java.io.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:
    `java.io.IOException`

### getInputStream

    public java.io.InputStream getInputStream()
                                       throws java.io.IOException

  Description copied from class: `URLResource`
  Returns an input stream to the resource

  Overrides:
    `getInputStream` in class `URLResource`
  Throws:
    `java.io.IOException`

### copyTo

    public void copyTo(java.io.File directory)
                throws java.io.IOException

  Overrides:
    `copyTo` in class `Resource`
  Throws:
    `java.io.IOException`

### newJarResource

    public static Resource newJarResource(Resource resource)
                                   throws java.io.IOException

  Throws:
    `java.io.IOException`

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