org.codehaus.plexus.digest

## Interface StreamingDigester

All Known Implementing Classes:
  AbstractStreamingDigester, StreamingMd5Digester, StreamingSha1Digester

    public interface StreamingDigester

Gradually create a digest for a stream.

Author:
  Brett Porter

### Field Summary

Fields
`static String` `ROLE`

### Method Summary

All Methods Instance Methods Abstract Methods
`String` `calc()` Calculate the current checksum.
`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.

### Field Detail

#### ROLE

    static final String ROLE

### Method Detail

#### getAlgorithm

    String getAlgorithm()

Get the algorithm used for the checksum.

Returns:
  the algorithm

#### reset

    void reset()
        throws DigesterException

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

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

#### calc

    String calc()
         throws DigesterException

Calculate the current checksum.

Returns:
  the current checksum.
Throws:
  `DigesterException` - if there was a problem computing the hashcode.

#### update

    void update(InputStream is)
         throws DigesterException

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.