AbstractArchiveResource.JarInputStreamWrapper (Apache Tomcat 8.5.43 API Documentation)

org.apache.catalina.webresources

## Class AbstractArchiveResource.JarInputStreamWrapper

- java.lang.Object
- - java.io.InputStream
  - - org.apache.catalina.webresources.AbstractArchiveResource.JarInputStreamWrapper

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
  Enclosing class:
    AbstractArchiveResource

      protected class AbstractArchiveResource.JarInputStreamWrapper
      extends java.io.InputStream

  This wrapper assumes that the InputStream was created from a JarFile obtained from a call to getArchiveResourceSet().openJarFile(). If this is not the case then the usage counting in AbstractArchiveResourceSet will break and the JarFile may be unexpectedly closed.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractArchiveResource.JarInputStreamWrapper(java.util.jar.JarEntry jarEntry, java.io.InputStream is)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `available()`
    `void` | `close()`
    `java.security.cert.Certificate[]` | `getCertificates()`
    `void` | `mark(int readlimit)`
    `boolean` | `markSupported()`
    `int` | `read()`
    `int` | `read(byte[] b)`
    `int` | `read(byte[] b, int off, int len)`
    `void` | `reset()`
    `long` | `skip(long n)`

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### AbstractArchiveResource.JarInputStreamWrapper

          public AbstractArchiveResource.JarInputStreamWrapper(java.util.jar.JarEntry jarEntry,
                                                       java.io.InputStream is)

  - ### Method Detail

    - #### read

          public int read()
                   throws java.io.IOException

      Specified by:
        `read` in class `java.io.InputStream`
      Throws:
        `java.io.IOException`

    - #### read

          public int read(byte[] b)
                   throws java.io.IOException

      Overrides:
        `read` in class `java.io.InputStream`
      Throws:
        `java.io.IOException`

    - #### read

          public int read(byte[] b,
                 int off,
                 int len)
                   throws java.io.IOException

      Overrides:
        `read` in class `java.io.InputStream`
      Throws:
        `java.io.IOException`

    - #### skip

          public long skip(long n)
                    throws java.io.IOException

      Overrides:
        `skip` in class `java.io.InputStream`
      Throws:
        `java.io.IOException`

    - #### available

          public int available()
                        throws java.io.IOException

      Overrides:
        `available` in class `java.io.InputStream`
      Throws:
        `java.io.IOException`

    - #### close

          public void close()
                     throws java.io.IOException

      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Overrides:
        `close` in class `java.io.InputStream`
      Throws:
        `java.io.IOException`

    - #### mark

          public void mark(int readlimit)

      Overrides:
        `mark` in class `java.io.InputStream`

    - #### reset

          public void reset()
                     throws java.io.IOException

      Overrides:
        `reset` in class `java.io.InputStream`
      Throws:
        `java.io.IOException`

    - #### markSupported

          public boolean markSupported()

      Overrides:
        `markSupported` in class `java.io.InputStream`

    - #### getCertificates

          public java.security.cert.Certificate[] getCertificates()

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.