public abstract class AbstractStreamingDigester extends Object implements StreamingDigester
Modifier and Type | Field and Description |
---|---|
protected MessageDigest |
md |
ROLE
Modifier | Constructor and Description |
---|---|
protected |
AbstractStreamingDigester(String algorithm) |
Modifier and Type | Method and Description |
---|---|
String |
calc()
Calculate the current checksum.
|
protected static String |
calc(MessageDigest md) |
String |
getAlgorithm()
Get the algorithm used for the checksum.
|
void |
reset()
Reset the hashcode calculation algorithm.
|
void |
update(InputStream is)
Update the checksum with the content of the input stream.
|
protected static void |
update(InputStream is,
MessageDigest digest) |
protected final MessageDigest md
protected AbstractStreamingDigester(String algorithm)
public String getAlgorithm()
StreamingDigester
getAlgorithm
in interface StreamingDigester
public String calc() throws DigesterException
StreamingDigester
calc
in interface StreamingDigester
DigesterException
- if there was a problem computing the hashcode.public void reset() throws DigesterException
StreamingDigester
StreamingDigester.update(InputStream)
reset
in interface StreamingDigester
DigesterException
- if there was a problem with the internal message digestpublic void update(InputStream is) throws DigesterException
StreamingDigester
update
in interface StreamingDigester
is
- the input streamDigesterException
- if there was a problem computing the hashcode.protected static String calc(MessageDigest md)
protected static void update(InputStream is, MessageDigest digest) throws DigesterException
DigesterException
Copyright © 2001–2015 Codehaus Plexus. All rights reserved.