Algorithm
public class ChecksumAlgorithm extends java.lang.Object implements Algorithm
name | values | description | required |
---|---|---|---|
algorithm.algorithm | ADLER | CRC (default) | name of the algorithm the checksum should use | no, defaults to CRC |
Constructor | Description |
---|---|
ChecksumAlgorithm() |
Modifier and Type | Method | Description |
---|---|---|
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().
|
public void setAlgorithm(java.lang.String algorithm)
algorithm
- the digest algorithm to usepublic void initChecksum()
public boolean isValid()
public java.lang.String getValue(java.io.File file)
public java.lang.String toString()
toString
in class java.lang.Object