public class

JarVerifierStream

extends ZipInputStream
java.lang.Object
   ↳ java.io.InputStream
     ↳ java.io.FilterInputStream
       ↳ java.util.zip.InflaterInputStream
         ↳ java.util.zip.ZipInputStream
           ↳ sun.tools.jar.JarVerifierStream

Class Overview

This is OBSOLETE. DO NOT USE THIS. Use java.util.jar.JarEntry.getCertificates instead. It has to stay here because some apps (namely HJ and HJV) call directly into it. This class is stripped down greatly from JDK 1.1.x.

Summary

[Expand]
Inherited Constants
From class java.util.zip.ZipInputStream
[Expand]
Inherited Fields
From class java.util.zip.InflaterInputStream
From class java.io.FilterInputStream
Public Constructors
JarVerifierStream(InputStream is)
construct a JarVerfierStream from an input stream.
Public Methods
void close()
Closes this input stream and releases any system resources associated with the stream.
void closeEntry()
Closes the current ZIP entry and positions the stream for reading the next entry.
Enumeration getBlocks()
Returns an enumeration of PKCS7 blocks.
Manifest getManifest()
Convert java.util.jar.Manifest object to a sun.tools.jar.Manifest object.
Hashtable getNameToHash()
This method used to be called by various versions of AppletResourceLoader, even though they didn't do anything with the result.
synchronized ZipEntry getNextEntry()
This method scans to see which entry we're parsing and keeps various state information depending on what type of file is being parsed.
Hashtable getVerifiedSignatures()
Returns a Hashtable mapping filenames to vectors of identities.
int read()
read a single byte.
int read(byte[] b, int off, int len)
read an array of bytes.
Protected Methods
Vector getIds(Certificate[] certs)
Returns the Identity vector for the given array of Certificates
[Expand]
Inherited Methods
From class java.util.zip.ZipInputStream
From class java.util.zip.InflaterInputStream
From class java.io.FilterInputStream
From class java.io.InputStream
From class java.lang.Object
From interface java.io.Closeable

Public Constructors

public JarVerifierStream (InputStream is)

construct a JarVerfierStream from an input stream.

Throws
IOException

Public Methods

public void close ()

Closes this input stream and releases any system resources associated with the stream.

Throws
IOException

public void closeEntry ()

Closes the current ZIP entry and positions the stream for reading the next entry.

Throws
IOException

public Enumeration getBlocks ()

Returns an enumeration of PKCS7 blocks. This looks bogus, but Hotjava just checks to see if enumeration is not null to see if anything was signed!

public Manifest getManifest ()

Convert java.util.jar.Manifest object to a sun.tools.jar.Manifest object.

public Hashtable getNameToHash ()

This method used to be called by various versions of AppletResourceLoader, even though they didn't do anything with the result. We leave them and return null for backwards compatability.

public synchronized ZipEntry getNextEntry ()

This method scans to see which entry we're parsing and keeps various state information depending on what type of file is being parsed. Files it treats specially are:

  • Manifest files. At any point, this stream can be queried for a manifest. If it is present, a Manifest object will be returned.
  • Block Signature file. Like with the manifest, the stream can be queried at any time for all blocks parsed thus far.

Returns
  • the next ZIP file entry, or null if there are no more entries
Throws
IOException

public Hashtable getVerifiedSignatures ()

Returns a Hashtable mapping filenames to vectors of identities.

public int read ()

read a single byte.

Returns
  • the byte read, or -1 if end of compressed input is reached
Throws
IOException

public int read (byte[] b, int off, int len)

read an array of bytes.

Parameters
b the buffer into which the data is read
off the start offset in the destination array b
len the maximum number of bytes read
Returns
  • the actual number of bytes read, or -1 if the end of the entry is reached
Throws
IOException

Protected Methods

protected Vector getIds (Certificate[] certs)

Returns the Identity vector for the given array of Certificates