public final class ChecksumUtils
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
private |
ChecksumUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.Map<java.lang.String,java.lang.Object> |
calc(byte[] dataBytes,
java.util.Collection<java.lang.String> algos)
Deprecated.
Use SPI checksum selector instead.
|
static java.util.Map<java.lang.String,java.lang.Object> |
calc(java.io.File dataFile,
java.util.Collection<java.lang.String> algos)
Deprecated.
Use SPI checksum selector instead.
|
private static java.util.Map<java.lang.String,java.lang.Object> |
calc(java.io.InputStream data,
java.util.Collection<java.lang.String> algos) |
static byte[] |
fromHexString(java.lang.String hexString)
Creates a byte array out of hexadecimal representation of the specified bytes.
|
static java.lang.String |
read(java.io.File checksumFile)
Deprecated.
Use SPI FileProcessor to read and write checksum files.
|
static java.lang.String |
toHexString(byte[] bytes)
Creates a hexadecimal representation of the specified bytes.
|
@Deprecated
public static java.lang.String read(java.io.File checksumFile)
throws java.io.IOException
checksumFile - The path to the checksum file, must not be null.null.java.io.IOException - If the checksum does not exist or could not be read for other reasons.@Deprecated
public static java.util.Map<java.lang.String,java.lang.Object> calc(java.io.File dataFile,
java.util.Collection<java.lang.String> algos)
throws java.io.IOException
dataFile - The file for which to calculate checksums, must not be null.algos - The names of checksum algorithms (cf. MessageDigest.getInstance(String) to use, must not be
null.null.java.io.IOException - If the data file could not be read.@Deprecated
public static java.util.Map<java.lang.String,java.lang.Object> calc(byte[] dataBytes,
java.util.Collection<java.lang.String> algos)
throws java.io.IOException
java.io.IOExceptionprivate static java.util.Map<java.lang.String,java.lang.Object> calc(java.io.InputStream data,
java.util.Collection<java.lang.String> algos)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String toHexString(byte[] bytes)
bytes - The bytes to represent in hex notation, may be be null.null if the input was null.public static byte[] fromHexString(java.lang.String hexString)
null,
null is returned. Input value must have even length (due hex encoding = 2 chars one byte).hexString - The hexString to convert to byte array, may be null.null if the input was null.