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()
StreamingDigestergetAlgorithm in interface StreamingDigesterpublic String calc() throws DigesterException
StreamingDigestercalc in interface StreamingDigesterDigesterException - if there was a problem computing the hashcode.public void reset()
throws DigesterException
StreamingDigesterStreamingDigester.update(InputStream)reset in interface StreamingDigesterDigesterException - if there was a problem with the internal message digestpublic void update(InputStream is) throws DigesterException
StreamingDigesterupdate in interface StreamingDigesteris - 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
DigesterExceptionCopyright © 2001–2015 Codehaus Plexus. All rights reserved.