|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.spardat.xma.boot.transform.HashChecksum
Class for calculation checksum values for jar-files and plain files. For jar-files a MD5-hash is calculated over the contents of all files contained in the jar-file. Only the contents of the files determine the hash value, their names, timestamps etc. do not influence the hash value. For plain files (text files, native libs, etc.) a MD5-hash is clalculated over the content of the file.
| Constructor Summary | |
HashChecksum()
|
|
| Method Summary | |
static boolean |
areEqual(byte[] a,
byte[] b)
Compare two application descriptor hash codes |
static java.lang.String |
calcCheckSum(byte[] data)
Calculates the hashvalue over the content of a plain file or a native lib. |
static java.lang.String |
calcFileCheckSum(java.io.File file)
Calculates the hashvalue for a plain file or a native lib. |
static java.lang.String |
calcJarCheckSum(java.io.File file)
Calculates the hasvalue for jar-files. |
static java.lang.String |
toHexString(byte[] data)
Converts the given binary data int a hexadezimal string representation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HashChecksum()
| Method Detail |
public static java.lang.String calcJarCheckSum(java.io.File file)
throws java.io.IOException
file - the jar-file to calculate the hash value for.
java.io.IOException - on errors reading the file
public static java.lang.String calcFileCheckSum(java.io.File file)
throws java.io.IOException
file - the jar-file to calculate the hash value for.
java.io.IOException - on errors reading the filepublic static java.lang.String calcCheckSum(byte[] data)
data - the bytes over which to caluclate the checksum
public static java.lang.String toHexString(byte[] data)
data - to convert
public static boolean areEqual(byte[] a,
byte[] b)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||