org.codehaus.plexus.digest
public abstract class AbstractDigester extends java.lang.Object implements Digester
Modifier | Constructor and Description |
---|---|
protected |
AbstractDigester(StreamingDigester streamingDigester) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
calc(java.io.File file)
Calculate a checksum for a file.
|
java.lang.String |
getAlgorithm()
Get the algorithm used for the checksum.
|
java.lang.String |
toString() |
void |
verify(java.io.File file,
java.lang.String checksum)
Verify that a checksum is correct.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFilenameExtension
protected AbstractDigester(StreamingDigester streamingDigester)
public java.lang.String getAlgorithm()
Digester
getAlgorithm
in interface Digester
public java.lang.String calc(java.io.File file) throws DigesterException
Digester
calc
in interface Digester
file
- the file to calculate the checksum forDigesterException
- if there was a problem computing the hashcode.public void verify(java.io.File file, java.lang.String checksum) throws DigesterException
Digester
verify
in interface Digester
file
- the file to compute the checksum forchecksum
- the checksum to compare toDigesterException
- if there was a problem computing the hashcode.public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2014. All Rights Reserved.