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<String> mandatoryTags
defaults
protected Map<String,CharSequence> defaults
TagValue
public TagValue(String data)
tagSet
protected Set<String> tagSet()
containsTag
protected boolean containsTag(String tag)
trimFWS
protected CharSequence trimFWS(CharSequence data,
int tStart,
int tStop,
boolean trimWSP)
newTagValue
protected Map<String,CharSequence> 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<String> 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<CharSequence> stringToColonSeparatedList(String h,
Pattern pattern)
isInListCaseInsensitive
protected boolean isInListCaseInsensitive(CharSequence hash,
List<CharSequence> hashes)
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.