Package liquibase.change
Class CheckSum
- java.lang.Object
-
- liquibase.change.CheckSum
-
public final class CheckSum extends Object
CheckSums are used by liquibase to determine if a Change has been modified since it was originally ran. CheckSums can be computed on either a String or anInputStream
. 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.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static CheckSum
compute(InputStream stream, boolean standardizeLineEndings)
Compute a CheckSum of the given data stream (no normalization of line endings!)static CheckSum
compute(String valueToChecksum)
Compute a storedCheckSum of the given string.boolean
equals(Object obj)
static int
getCurrentVersion()
Deprecated.UseChecksumVersion.latest()
insteadint
hashCode()
static CheckSum
parse(String checksumValue)
Parse the given storedCheckSum string value and return a new CheckSum object.String
toString()
-
-
-
Method Detail
-
parse
public static CheckSum parse(String checksumValue)
Parse the given storedCheckSum string value and return a new CheckSum object.
-
getCurrentVersion
@Deprecated public static int getCurrentVersion()
Deprecated.UseChecksumVersion.latest()
insteadReturn the current CheckSum algorithm version.
-
compute
public static CheckSum compute(String valueToChecksum)
Compute a storedCheckSum of the given string.
-
compute
public static CheckSum compute(InputStream stream, boolean standardizeLineEndings)
Compute a CheckSum of the given data stream (no normalization of line endings!)
-
-