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.
  • Field Details

  • Constructor Details

    • TagValue

      public TagValue(String data)
  • Method Details

    • 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
    • debugMsg

      protected void debugMsg(String msg)
      Parameters:
      msg - the message