org.codehaus.plexus.digest
public abstract class AbstractStreamingDigester extends java.lang.Object implements StreamingDigester
Modifier and Type | Field and Description |
---|---|
protected java.security.MessageDigest |
md |
ROLE
Modifier | Constructor and Description |
---|---|
protected |
AbstractStreamingDigester(java.lang.String algorithm) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
calc()
Calculate the current checksum.
|
protected static java.lang.String |
calc(java.security.MessageDigest md) |
java.lang.String |
getAlgorithm()
Get the algorithm used for the checksum.
|
void |
reset()
Reset the hashcode calculation algorithm.
|
void |
update(java.io.InputStream is)
Update the checksum with the content of the input stream.
|
protected static void |
update(java.io.InputStream is,
java.security.MessageDigest digest) |
protected AbstractStreamingDigester(java.lang.String algorithm)
public java.lang.String getAlgorithm()
StreamingDigester
getAlgorithm
in interface StreamingDigester
public java.lang.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(java.io.InputStream is) throws DigesterException
StreamingDigester
update
in interface StreamingDigester
is
- the input streamDigesterException
- if there was a problem computing the hashcode.protected static java.lang.String calc(java.security.MessageDigest md)
protected static void update(java.io.InputStream is, java.security.MessageDigest digest) throws DigesterException
DigesterException
Copyright © 2014. All Rights Reserved.