Package org.codehaus.plexus.digest
Interface StreamingDigester
- All Known Implementing Classes:
AbstractStreamingDigester,StreamingMd5Digester,StreamingSha1Digester,StreamingSha256Digester
public interface StreamingDigester
Gradually create a digest for a stream.
- Author:
- Brett Porter
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncalc()Calculate the current checksum.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 Details
-
ROLE
ConstantROLE="StreamingDigester.class.getName()"
-
-
Method Details
-
getAlgorithm
String getAlgorithm()Get the algorithm used for the checksum.- Returns:
- the algorithm
-
reset
Reset the hashcode calculation algorithm. Only useful when performing incremental hashcodes based on repeated use ofupdate(InputStream)- Throws:
DigesterException- if there was a problem with the internal message digest
-
calc
Calculate the current checksum.- Returns:
- the current checksum.
- Throws:
DigesterException- if there was a problem computing the hashcode.
-
update
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.
-