Class ChecksumHelper
java.lang.Object
org.apache.ivy.util.ChecksumHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringbyteArrayToHexString(byte[] in) Convert a byte[] array to readable string format.static voidChecks the checksum of the given file against the given checksumFile, and throws an IOException if the checksum is not compliantstatic StringcomputeAsString(File f, String algorithm) static booleanisKnownAlgorithm(String algorithm)
-
Method Details
-
check
Checks the checksum of the given file against the given checksumFile, and throws an IOException if the checksum is not compliant- Parameters:
dest- the file to testchecksumFile- the file containing the expected checksumalgorithm- the checksum algorithm to use- Throws:
IOException- if an IO problem occur while reading files or if the checksum is not compliant
-
computeAsString
- Throws:
IOException
-
isKnownAlgorithm
-
byteArrayToHexString
Convert a byte[] array to readable string format. This makes the "hex" readable!- Parameters:
in- byte[] buffer to convert to string format- Returns:
- result String buffer in String format
-