org.apache.tools.ant.taskdefs
public class Checksum extends MatchingTask implements Condition
Since: Ant 1.5
UNKNOWN: category="control"
Nested Class Summary | |
---|---|
static class | Checksum.FormatElement
Helper class for the format attribute.
|
Method Summary | |
---|---|
void | add(ResourceCollection rc)
Add a resource collection. |
void | addFileset(FileSet set)
Files to generate checksums for. |
static byte[] | decodeHex(char[] data)
Converts an array of characters representing hexadecimal values into an
array of bytes of those same values. |
boolean | eval()
Calculate the checksum(s)
|
void | execute()
Calculate the checksum(s). |
void | setAlgorithm(String algorithm)
Specifies the algorithm to be used to compute the checksum.
|
void | setFile(File file)
Sets the file for which the checksum is to be calculated. |
void | setFileext(String fileext)
Sets the file extension that is be to used to
create or identify destination file. |
void | setForceOverwrite(boolean forceOverwrite)
Whether or not to overwrite existing file irrespective of
whether it is newer than
the source file. |
void | setFormat(Checksum.FormatElement e)
Select the in/output pattern via a well know format name. |
void | setPattern(String p)
Specify the pattern to use as a MessageFormat pattern.
|
void | setProperty(String property)
Sets the property to hold the generated checksum. |
void | setProvider(String provider)
Sets the MessageDigest algorithm provider to be used
to calculate the checksum. |
void | setReadBufferSize(int size)
The size of the read buffer to use. |
void | setTodir(File todir)
Sets the root directory where checksum files will be
written/read |
void | setTotalproperty(String totalproperty)
Sets the property to hold the generated total checksum
for all files. |
void | setVerifyproperty(String verifyProperty)
Sets the verify property. |
Parameters: rc the ResourceCollection to add.
Parameters: set a fileset of files to generate checksums for.
Parameters: data an array of characters representing hexadecimal values
Returns: the converted array of bytes
Throws: BuildException on error
Returns: Returns true if the checksum verification test passed, false otherwise.
Throws: BuildException on error
Throws: BuildException on error
Parameters: algorithm a String
value
Parameters: file a File
value
Parameters: fileext a String
value
Parameters: forceOverwrite a boolean
value
Parameters: e an enumerated
value
Since: 1.7.0
{0} gets replaced by the checksum, {1} by the filename.
Parameters: p a String
value
Since: 1.7.0
Parameters: property a String
value
Parameters: provider a String
value
Parameters: size an int
value
Parameters: todir the directory to write to
Since: Ant 1.6
Parameters: totalproperty a String
value
Since: Ant 1.6
Parameters: verifyProperty a String
value