|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.types.selectors.modifiedselector.ChecksumAlgorithm
public class ChecksumAlgorithm
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 s. Supported s are:
name | values | description | required |
---|---|---|---|
algorithm.algorithm | ADLER | CRC ( default ) | name of the algorithm the checksum should use | no, defaults to CRC |
Constructor Summary | |
---|---|
ChecksumAlgorithm()
|
Method Summary | |
---|---|
java.lang.String |
getValue(java.io.File file)
Computes a value for a file content with the specified checksum algorithm. |
void |
initChecksum()
Initialize the checksum interface. |
boolean |
isValid()
This algorithm supports only CRC and Adler. |
void |
setAlgorithm(java.lang.String algorithm)
Specifies the algorithm to be used to compute the checksum. |
java.lang.String |
toString()
Override Object.toString(). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ChecksumAlgorithm()
Method Detail |
---|
public void setAlgorithm(java.lang.String algorithm)
algorithm
- the digest algorithm to usepublic void initChecksum()
public boolean isValid()
isValid
in interface Algorithm
public java.lang.String getValue(java.io.File file)
getValue
in interface Algorithm
file
- File object for which the value should be evaluated.
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |