public class MessageDigestFileDigester extends AbstractFileDigester
FileDigester that streams the content of files to a MessageDigest.algorithmSTREAMING_BUFFER_SIZE| Modifier | Constructor and Description |
|---|---|
protected |
MessageDigestFileDigester(String algorithm)
Build a new instance of
MessageDigestFileDigester. |
| Modifier and Type | Method and Description |
|---|---|
String |
calculate(File file)
Calculate a checksum for a file.
|
getAlgorithm, getFileExtensionprotected MessageDigestFileDigester(String algorithm) throws NoSuchAlgorithmException
MessageDigestFileDigester.algorithm - the algorithm used to compute checksum digests.NoSuchAlgorithmException - in case the given is not supported.public String calculate(File file) throws DigesterException, NoSuchAlgorithmException
file - the file to compute the checksum for.DigesterException - if there was a problem computing the hashcode.NoSuchAlgorithmException - in case the given is not supported.Copyright © 2010–2018. All rights reserved.