src/java.base/share/classes/java/util/jar/JarInputStream.java

Print this page
rev 13958 : 8152190: Move sun.misc.JarIndex and InvalidJarIndexException to an internal package
Reviewed-by:


  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.util.jar;
  27 
  28 import java.util.zip.*;
  29 import java.io.*;
  30 import sun.security.util.ManifestEntryVerifier;
  31 import sun.misc.JarIndex;
  32 
  33 /**
  34  * The <code>JarInputStream</code> class is used to read the contents of
  35  * a JAR file from any input stream. It extends the class
  36  * <code>java.util.zip.ZipInputStream</code> with support for reading
  37  * an optional <code>Manifest</code> entry. The <code>Manifest</code>
  38  * can be used to store meta-information about the JAR file and its entries.
  39  *
  40  * @author  David Connelly
  41  * @see     Manifest
  42  * @see     java.util.zip.ZipInputStream
  43  * @since   1.2
  44  */
  45 public
  46 class JarInputStream extends ZipInputStream {
  47     private Manifest man;
  48     private JarEntry first;
  49     private JarVerifier jv;
  50     private ManifestEntryVerifier mev;
  51     private final boolean doVerify;




  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.util.jar;
  27 
  28 import java.util.zip.*;
  29 import java.io.*;
  30 import sun.security.util.ManifestEntryVerifier;
  31 import jdk.internal.util.jar.JarIndex;
  32 
  33 /**
  34  * The <code>JarInputStream</code> class is used to read the contents of
  35  * a JAR file from any input stream. It extends the class
  36  * <code>java.util.zip.ZipInputStream</code> with support for reading
  37  * an optional <code>Manifest</code> entry. The <code>Manifest</code>
  38  * can be used to store meta-information about the JAR file and its entries.
  39  *
  40  * @author  David Connelly
  41  * @see     Manifest
  42  * @see     java.util.zip.ZipInputStream
  43  * @since   1.2
  44  */
  45 public
  46 class JarInputStream extends ZipInputStream {
  47     private Manifest man;
  48     private JarEntry first;
  49     private JarVerifier jv;
  50     private ManifestEntryVerifier mev;
  51     private final boolean doVerify;