Lizzy v1.1.1

christophedelory.rss.media
Class Hash

java.lang.Object
  extended by christophedelory.rss.media.Hash

public class Hash
extends Object

This is the hash of the binary media file. It can appear multiple times as long as each instance is a different algo. Example:

 <media:hash algo="md5">dfdec888b72151965a34b4b59031290a</media:hash>
 

Version:
$Revision: 92 $
Author:
Christophe Delory

Constructor Summary
Hash()
           
 
Method Summary
 String getAlgo()
          Returns the algorithm used to create the hash.
 String getValue()
          Returns the hash value.
 void setAlgo(String algo)
          Initializes the algorithm used to create the hash.
 void setValue(String value)
          Initializes the hash value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Hash

public Hash()
Method Detail

setValue

public void setValue(String value)
Initializes the hash value.

Parameters:
value - a hash value. Shall not be null.
Throws:
NullPointerException - if value is null.
See Also:
getValue()

getValue

public String getValue()
Returns the hash value.

Returns:
a hash value. May be null if not yet initialized.
See Also:
setValue(java.lang.String)

setAlgo

public void setAlgo(String algo)
Initializes the algorithm used to create the hash.

Parameters:
algo - a hash algorithm. May be null.
See Also:
getAlgo()

getAlgo

public String getAlgo()
Returns the algorithm used to create the hash. Possible values are 'md5' and 'sha-1'. Default value is 'md5'.

Returns:
a hash algorithm. May be null.
See Also:
setAlgo(java.lang.String)

© 2008-2009 Christophe Delory

Copyright © 2008-2009 Christophe Delory. All Rights Reserved.