com.sun.syndication.feed.module.mediarss.types
Class Hash

java.lang.Object
  extended by com.sun.syndication.feed.module.mediarss.types.AbstractSchemeValue
      extended by com.sun.syndication.feed.module.mediarss.types.Hash
All Implemented Interfaces:
java.io.Serializable

public class Hash
extends AbstractSchemeValue
implements java.io.Serializable

<media:hash>

This is the hash of the binary media file. It can appear multiple times as long as each instance is a different algo. It has 1 optional attribute.

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

algo indicates the algorithm used to create the hash. Possible values are 'md5' and 'sha-1'. Default value is 'md5'. It is an optional attribute.

Author:
cooper
See Also:
Serialized Form

Constructor Summary
Hash(java.lang.String value)
          Creates a new instance of Hash assuming the default algorithm of MD5
Hash(java.lang.String algorithm, java.lang.String value)
          Creates a new instance of Hash
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAlgorithm()
          Alsorithm used for the hash
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class com.sun.syndication.feed.module.mediarss.types.AbstractSchemeValue
getScheme, getValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Hash

public Hash(java.lang.String algorithm,
            java.lang.String value)
Creates a new instance of Hash

Parameters:
algorithm - algoright used
value - value of the hash

Hash

public Hash(java.lang.String value)
Creates a new instance of Hash assuming the default algorithm of MD5

Parameters:
algorithm - algoright used
Method Detail

getAlgorithm

public java.lang.String getAlgorithm()
Alsorithm used for the hash

Returns:
Alsorithm used for the hash

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2006-2009. All Rights Reserved.