public class CheckSum extends Object
InputStream
.
The CheckSum contains a version number which can be used to determine whether the algorithm for computing a checksum has changed
since the last time it was computed. If the algorithm changes, we cannot rely on the checksum value.
It is not up to this class to determine what should be checksum-ed, it simply hashes what is passed to it.Modifier and Type | Method and Description |
---|---|
static CheckSum |
compute(InputStream stream,
boolean standardizeLineEndings)
Compute a checksum of the given data stream.
|
static CheckSum |
compute(String valueToChecksum)
Compute a checksum of the given string.
|
boolean |
equals(Object obj) |
static int |
getCurrentVersion()
Return the current CheckSum algorithm version.
|
int |
getVersion()
Return the Checksum Algorithm version for this CheckSum
|
int |
hashCode() |
static CheckSum |
parse(String checksumValue)
Parse the given checksum string value into a CheckSum object.
|
String |
toString() |
public static CheckSum parse(String checksumValue)
public static int getCurrentVersion()
public static CheckSum compute(String valueToChecksum)
public static CheckSum compute(InputStream stream, boolean standardizeLineEndings)
public int getVersion()
Copyright © 2016 Liquibase.org. All rights reserved.