On 12/04/2008, at 12:36 PM, Joakim Erdfelt wrote:
Brett Porter wrote:
Looks good to me. I say roll it into trunk.
A couple of uncertainties:
- isn't doFinal required?
doFinal ?
sorry, got confused with JCE :) it's digest() in MessageDigest, which
is there.
- I think it can use more tests
Agreed. Have any special use cases you want fleshed out?
Nah, just coverage for the other classes.
- what about passing referenceFile as a final field, since every
method uses it?
I started ChecksumFile as a utility class, but that might not be the
best decision.
Any opinions if I make ChecksumFile an instantiated class?
ChecksumFile cf = new ChecksumFile(new File("random.jar"));
if( cf.valid() == false ) {
cf.createChecksum( ChecksumAlgorithm.SHA1 );
}
wdyt?
would that be validateChecksum( ChecksumAlgorithm) ?
- Brett
--
Brett Porter
[EMAIL PROTECTED]
http://blogs.exist.com/bporter/