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

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `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

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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, getWeakETag, isContainedIn, newClassPathResource, newClassPathResource, newResource, newResource, newResource, newResource, newResource, newSystemResource, setAssociate, setDefaultUseCaches, toURL, 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-2013 Mort Bay Consulting. All Rights Reserved.