Class ChecksumAlgorithm
java.lang.Object
org.apache.tools.ant.types.selectors.modifiedselector.ChecksumAlgorithm
- All Implemented Interfaces:
- Algorithm
Computes a 'checksum' for the content of file using
 java.util.zip.CRC32 and java.util.zip.Adler32.
 Use of this algorithm doesn't require any additional nested <param>s.
 Supported <param>s are:
 
 
| name | values | description | required | 
|---|---|---|---|
| algorithm.algorithm | ADLER | CRC (default) | name of the algorithm the checksum should use | no, defaults to CRC | 
- Since:
- Ant 1.7
- Version:
- 2004-06-17
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionComputes a value for a file content with the specified checksum algorithm.voidInitialize the checksum interface.booleanisValid()This algorithm supports only CRC and Adler.voidsetAlgorithm(String algorithm) Specifies the algorithm to be used to compute the checksum.toString()Override Object.toString().
- 
Constructor Details- 
ChecksumAlgorithmpublic ChecksumAlgorithm()
 
- 
- 
Method Details- 
setAlgorithmSpecifies the algorithm to be used to compute the checksum. Defaults to "CRC". Other popular algorithms like "ADLER" may be used as well.- Parameters:
- algorithm- the digest algorithm to use
 
- 
initChecksumpublic void initChecksum()Initialize the checksum interface.
- 
isValid
- 
getValue
- 
toString
 
-