Class java.lang.FingerPrintClass
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.lang.FingerPrintClass

java.lang.Object
   |
   +----java.lang.FingerPrintClass

public class FingerPrintClass
extends Object
Creates a 20 byte hash for a class using the signatures of its fields and methods, and those of its superclasses. The Hash algorithm used is the Secure Hash Algorithm designed by NIST.

This hash does not duplicate the function of the verifier. The hash does not cover the fields or methods of other classes this class refers to. The checking of inter-class dependencies is left up to the Verifier used by the class loader.

Part of the implemention of this class is native and requires the appropriate library to be available.

See Also:
SHAOutputStream

Method Index

 o compute(Class)
Compute the fingerprint of the specified class.
 o compute(String)
Compute the fingerprint of the class.
 o computeTotal(Class)
Compute the total fingerprint of the specified class as the fingerprint of the class plus the fingerprints of all of related classes.
 o computeTotal(String)
Compute the total fingerprint of the specified class.

Methods

 o compute
  public static byte[] compute(String classname) throws ClassNotFoundException, IOException
Compute the fingerprint of the class. It returns an array of bytes containing the fingerprint. The fingerprint covers the private interface of the class and its superclasses.
Throws: ClassNotFoundException
If the named class can not be found
Throws: IOException
Any of the usual I/O stream exceptions.
 o compute
  public static byte[] compute(Class aclass) throws IOException
Compute the fingerprint of the specified class. It returns an array of bytes containing the fingerprint. The fingerprint covers the private interface of the class and its superclasses.
Throws: IOException
Any of the usual I/O stream exceptions.
 o computeTotal
  public static byte[] computeTotal(String classname) throws ClassNotFoundException, IOException
Compute the total fingerprint of the specified class. It returns an array of bytes containing the fingerprint. The fingerprint covers the private interface of the class and its superclasses as well as the fingerprints of the classes refered to by this class.
Throws: ClassNotFoundException
If the named class can not be found
Throws: IOException
Any of the usual I/O stream exceptions.
 o computeTotal
  public static byte[] computeTotal(Class aclass) throws IOException, ClassNotFoundException
Compute the total fingerprint of the specified class as the fingerprint of the class plus the fingerprints of all of related classes. The related classes are the types of any field and the types of all method's arguments and return types.
Throws: ClassNotFoundException
If the named class can not be found
Throws: IOException
Any of the usual I/O stream exceptions.

All Packages  Class Hierarchy  This Package  Previous  Next  Index