org.codehaus.plexus.digest

Interface Digester

public interface Digester

Create a digest for a file.

Author: Brett Porter

Field Summary
StringROLE
Method Summary
Stringcalc(File file)
Calculate a checksum for a file.
StringgetAlgorithm()
Get the algorithm used for the checksum.
StringgetFilenameExtension()
The filename extension for this digester.
voidverify(File file, String checksum)
Verify that a checksum is correct.

Field Detail

ROLE

public String ROLE

Method Detail

calc

public String calc(File file)
Calculate a checksum for a file.

Parameters: file the file to calculate the checksum for

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

getFilenameExtension

public String getFilenameExtension()
The filename extension for this digester.

Returns: the filename extension.

verify

public void verify(File file, String checksum)
Verify that a checksum is correct.

Parameters: file the file to compute the checksum for checksum the checksum to compare to

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

Copyright © 2001-2009 Codehaus. All Rights Reserved.