Class MailcapTokenizer

java.lang.Object
org.eclipse.angus.activation.MailcapTokenizer

public class MailcapTokenizer extends Object
A tokenizer for strings in the form of "foo/bar; prop1=val1; ... ". Useful for parsing MIME content types.
  • Field Details

  • Constructor Details

    • MailcapTokenizer

      public MailcapTokenizer(String inputString)
      Constructor
      Parameters:
      inputString - the string to tokenize
  • Method Details

    • setIsAutoquoting

      public void setIsAutoquoting(boolean value)
      Set whether auto-quoting is on or off. Auto-quoting means that all characters after the first non-whitespace, non-control character up to the auto-quote terminator character or EOI (minus any whitespace immediatley preceeding it) is considered a token. This is required for handling command strings in a mailcap entry.
      Parameters:
      value - on or off
    • getCurrentToken

      public int getCurrentToken()
      Retrieve current token.
      Returns:
      The current token value
    • nameForToken

      public static String nameForToken(int token)
    • getCurrentTokenValue

      public String getCurrentTokenValue()
    • nextToken

      public int nextToken()