Class ChecksumAlgorithmHelper
java.lang.Object
org.eclipse.aether.spi.connector.checksum.ChecksumAlgorithmHelper
Helper for checksum operations.
- Since:
- 1.8.0
-
Method Summary
-
Method Details
-
calculate
public static Map<String,String> calculate(byte[] data, List<ChecksumAlgorithmFactory> factories) throws IOException Calculates checksums for specified data.- Parameters:
data
- The content for which to calculate checksums, must not benull
.factories
- The checksum algorithm factories to use, must not benull
.- Returns:
- The calculated checksums, indexed by algorithm name, or the exception that occurred while trying to
calculate it, never
null
. - Throws:
IOException
- In case of any problem.
-
calculate
public static Map<String,String> calculate(File file, List<ChecksumAlgorithmFactory> factories) throws IOException Calculates checksums for specified file.- Parameters:
file
- The file for which to calculate checksums, must not benull
.factories
- The checksum algorithm factories to use, must not benull
.- Returns:
- The calculated checksums, indexed by algorithm name, or the exception that occurred while trying to
calculate it, never
null
. - Throws:
IOException
- In case of any problem.
-