JarResource (Apache Tomcat 9.0.120 API Documentation)
Description: declaration: package: org.apache.catalina.webresources, class: JarResource

# Class JarResource

java.lang.Object
org.apache.catalina.webresources.AbstractResource
org.apache.catalina.webresources.AbstractArchiveResource
org.apache.catalina.webresources.AbstractSingleArchiveResource
org.apache.catalina.webresources.JarResource

All Implemented Interfaces:
  `WebResource`

public class JarResource extends AbstractSingleArchiveResource
Represents a single resource (file or directory) that is located within a JAR.

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from class AbstractArchiveResource

  `AbstractArchiveResource.JarInputStreamWrapper`

- ## Field Summary

  ### Fields inherited from class AbstractResource

  `sm`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JarResource(AbstractArchiveResourceSet archiveResourceSet, String webAppPath, String baseUrl, JarEntry jarEntry)`
  Constructs a new JarResource.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected Log`
  `getLog()`
  Gets the logger for this resource.

  ### Methods inherited from class AbstractSingleArchiveResource

  `getJarInputStreamWrapper`

  ### Methods inherited from class AbstractArchiveResource

  `canRead, delete, doGetInputStream, exists, getArchiveResourceSet, getBase, getBaseUrl, getCanonicalPath, getCertificates, getCodeBase, getContent, getContentLength, getCreation, getLastModified, getManifest, getName, getResource, getURL, isDirectory, isFile, isVirtual`

  ### Methods inherited from class AbstractResource

  `getETag, getInputStream, getLastModifiedHttp, getMimeType, getStrongETag, getWebappPath, getWebResourceRoot, setMimeType`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### JarResource

    public JarResource(AbstractArchiveResourceSet archiveResourceSet, String webAppPath, String baseUrl, JarEntry jarEntry)
    Constructs a new JarResource.
    Parameters:
      `archiveResourceSet` - the archive resource set
      `webAppPath` - the web application path
      `baseUrl` - the base URL
      `jarEntry` - the JAR entry

- ## Method Details

  - ### getLog

    protected Log getLog()
    Description copied from class: `AbstractResource`
    Gets the logger for this resource.
    Specified by:
      `getLog` in class `AbstractResource`
    Returns:
      the logger