org.apache.james.jdkim.tagvalue
Class TagValue
java.lang.Object
org.apache.james.jdkim.tagvalue.TagValue
- Direct Known Subclasses:
- PublicKeyRecordImpl, SignatureRecordImpl
public class TagValue
- extends Object
This class handle a tag=value list string as defined by DKIM specification It
also supports mandatoryTags and default values as a commodity to subclasses.
VALIDATION
protected static final boolean VALIDATION
- See Also:
- Constant Field Values
mandatoryTags
protected Set mandatoryTags
defaults
protected Map defaults
TagValue
public TagValue(String data)
tagSet
protected Set tagSet()
containsTag
protected boolean containsTag(String tag)
trimFWS
protected CharSequence trimFWS(CharSequence data,
int tStart,
int tStop,
boolean trimWSP)
newTagValue
protected Map newTagValue()
init
protected void init()
parse
protected void parse(String data)
- subclasses have to make sure tagValues is initialized during init().
- Parameters:
data
- the string to be parsed
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
getTags
public Set getTags()
getValue
protected CharSequence getValue(String key)
setValue
protected void setValue(String tag,
String value)
getDefault
protected CharSequence getDefault(String key)
validate
public void validate()
stringToColonSeparatedList
protected List stringToColonSeparatedList(String h,
Pattern pattern)
isInListCaseInsensitive
protected boolean isInListCaseInsensitive(CharSequence hash,
List hashes)
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2008-2009 The Apache Software Foundation. All Rights Reserved.