jonelo.jacksum.algorithm
Class CombinedChecksum
AbstractChecksum
jonelo.jacksum.algorithm.CombinedChecksum
public class CombinedChecksum
extends AbstractChecksum
void | addAlgorithm(String algorithm, boolean alternate)
|
void | firstFormat(StringBuffer formatBuf) - with this method the format() method can be customized, it will be launched at the beginning of format()
|
byte[] | getByteArray() - Returns the result of the computation as byte array.
|
void | reset()
|
void | setAlgorithms(String[] algos, boolean alternate)
|
void | setEncoding(String encoding) - Sets the encoding of the checksum.
|
void | update(byte b) - Updates all checksums with the specified byte.
|
void | update(byte[] bytes) - Updates all checksums with the specified array of bytes.
|
void | update(byte[] bytes, int offset, int length) - Updates all checksums with the specified array of bytes.
|
void | update(int b) - Updates all checksums with the specified byte.
|
CombinedChecksum
public CombinedChecksum()
Creates a new instance of CombinedChecksum
CombinedChecksum
public CombinedChecksum(String[] algos,
boolean alternate)
throws NoSuchAlgorithmException
addAlgorithm
public void addAlgorithm(String algorithm,
boolean alternate)
throws NoSuchAlgorithmException
firstFormat
public void firstFormat(StringBuffer formatBuf)
with this method the format() method can be customized, it will be launched at the beginning of format()
getByteArray
public byte[] getByteArray()
Returns the result of the computation as byte array.
setAlgorithms
public void setAlgorithms(String[] algos,
boolean alternate)
throws NoSuchAlgorithmException
setEncoding
public void setEncoding(String encoding)
throws EncodingException
Sets the encoding of the checksum.
encoding
- the encoding of the checksum.
update
public void update(byte b)
Updates all checksums with the specified byte.
update
public void update(byte[] bytes)
Updates all checksums with the specified array of bytes.
update
public void update(byte[] bytes,
int offset,
int length)
Updates all checksums with the specified array of bytes.
update
public void update(int b)
Updates all checksums with the specified byte.