org.codehaus.plexus.digest

Interface StreamingDigester

public interface StreamingDigester

Gradually create a digest for a stream.

Author: Brett Porter

Field Summary
StringROLE
Method Summary
Stringcalc()
Calculate the current checksum.
StringgetAlgorithm()
Get the algorithm used for the checksum.
voidreset()
Reset the hashcode calculation algorithm.
voidupdate(InputStream is)
Update the checksum with the content of the input stream.

Field Detail

ROLE

public String ROLE

Method Detail

calc

public String calc()
Calculate the current checksum.

Returns: the current checksum.

Throws: DigesterException if there was a problem computing the hashcode.

getAlgorithm

public String getAlgorithm()
Get the algorithm used for the checksum.

Returns: the algorithm

reset

public void reset()
Reset the hashcode calculation algorithm. Only useful when performing incremental hashcodes based on repeated use of update

Throws: DigesterException if there was a problem with the internal message digest

update

public void update(InputStream is)
Update the checksum with the content of the input stream.

Parameters: is the input stream

Throws: DigesterException if there was a problem computing the hashcode.

Copyright © 2001-2009 Codehaus. All Rights Reserved.