ro.isdc.wro.model.resource.util
Class AbstractDigesterHashBuilder
java.lang.Object
ro.isdc.wro.model.resource.util.AbstractDigesterHashBuilder
- All Implemented Interfaces:
- HashBuilder
- Direct Known Subclasses:
- MD5HashBuilder, SHA1HashBuilder
public abstract class AbstractDigesterHashBuilder
- extends Object
- implements HashBuilder
Uses abstract digester for creating a hash.
- Author:
- Alex Objelean
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractDigesterHashBuilder
public AbstractDigesterHashBuilder()
getHash
public String getHash(InputStream input)
throws IOException
-
- Specified by:
getHash in interface HashBuilder
- Parameters:
input - to digest.
- Returns:
- the hash of the content.
- Throws:
IOException - if there was an error during reading the stream content.
newMessageDigest
protected abstract MessageDigest newMessageDigest()
throws NoSuchAlgorithmException
- Returns:
- MessageDigest used for hashing.
- Throws:
NoSuchAlgorithmException
Copyright © 2008-2011. All Rights Reserved.