InputStream.
The CheckSum contains a version number which can be used to determine whether the algorithm for computing a
storedCheckSum has changed since the last time it was computed. If the algorithm changes, we cannot rely on
the storedCheckSum value.
It is not up to this class to determine what should be storedCheckSum-ed, it simply hashes what is passed to it.
| Modifier and Type | Field and Description |
|---|---|
| private static final Pattern | |
| private static final String | |
| private static final char | |
| private String | |
| private int | version
-- GETTER -- Return the Checksum Algorithm version for this CheckSum |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static CheckSum | |
| public static CheckSum | compute(final InputStream stream, boolean standardizeLineEndings)
Compute a CheckSum of the given data stream (no normalization of line endings!) |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| public static int | getCurrentVersion()
Deprecated
Use
ChecksumVersion#latest() instead
Return the current CheckSum algorithm version. |
| public int | |
| public static CheckSum | |
| public String |
| CHECKSUM_PATTERN | back to summary |
|---|---|
| private static final Pattern CHECKSUM_PATTERN | |
| CHECKSUM_REGEX | back to summary |
|---|---|
| private static final String CHECKSUM_REGEX | |
| DELIMITER | back to summary |
|---|---|
| private static final char DELIMITER | |
| storedCheckSum | back to summary |
|---|---|
| private String storedCheckSum | |
| version | back to summary |
|---|---|
| private int version -- GETTER -- Return the Checksum Algorithm version for this CheckSum
| |
| CheckSum | back to summary |
|---|---|
| private CheckSum(String checksum, int version) Constructor. Stores a given checksum generated by a given algorithm version into the new CheckSum object.
| |
| compute | back to summary |
|---|---|
| public static CheckSum compute(String valueToChecksum) Compute a storedCheckSum of the given string. | |
| compute | back to summary |
|---|---|
| public static CheckSum compute(final InputStream stream, boolean standardizeLineEndings) Compute a CheckSum of the given data stream (no normalization of line endings!) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getCurrentVersion | back to summary |
|---|---|
| public static int getCurrentVersion()
Deprecated Use Return the current CheckSum algorithm version.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| parse | back to summary |
|---|---|
| public static CheckSum parse(String checksumValue) Parse the given storedCheckSum string value and return a new CheckSum object. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |