|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.plexus.digest.ChecksumFile
public class ChecksumFile
ChecksumFile
Constructor Summary | |
---|---|
ChecksumFile()
|
Method Summary | |
---|---|
File |
createChecksum(File referenceFile,
Digester digester)
Creates a checksum file of the provided referenceFile. |
boolean |
isValidChecksum(File checksumFile)
Given a checksum file, check to see if the file it represents is valid according to the checksum. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChecksumFile()
Method Detail |
---|
public boolean isValidChecksum(File checksumFile) throws DigesterException, FileNotFoundException, IOException
Given a checksum file, check to see if the file it represents is valid according to the checksum.
NOTE: Only supports single file checksums of type MD5 or SHA1.
checksumFile
- the checksum file (must end in ".sha1" or ".md5")
DigesterException
- if there is a digester problem during the check of the reference file.
FileNotFoundException
- if the checksumFile itself or the file it refers to is not found.
IOException
- if the reading of the checksumFile or the file it refers to fails.public File createChecksum(File referenceFile, Digester digester) throws DigesterException, IOException
referenceFile
- the file to checksum.digester
- the digester to use.
DigesterException
- if there was a problem calculating the checksum of the referenceFile.
IOException
- if there was a problem either reading the referenceFile, or writing the checksum file.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |