Package com.sun.activation.registries
Class MailcapTokenizer
- java.lang.Object
-
- com.sun.activation.registries.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 Summary
Fields Modifier and Type Field Description static int
EOI_TOKEN
static int
EQUALS_TOKEN
static int
SEMICOLON_TOKEN
static int
SLASH_TOKEN
static int
START_TOKEN
static int
STRING_TOKEN
static int
UNKNOWN_TOKEN
-
Constructor Summary
Constructors Constructor Description MailcapTokenizer(String inputString)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCurrentToken()
Retrieve current token.String
getCurrentTokenValue()
static String
nameForToken(int token)
int
nextToken()
void
setIsAutoquoting(boolean value)
Set whether auto-quoting is on or off.
-
-
-
Field Detail
-
UNKNOWN_TOKEN
public static final int UNKNOWN_TOKEN
- See Also:
- Constant Field Values
-
START_TOKEN
public static final int START_TOKEN
- See Also:
- Constant Field Values
-
STRING_TOKEN
public static final int STRING_TOKEN
- See Also:
- Constant Field Values
-
EOI_TOKEN
public static final int EOI_TOKEN
- See Also:
- Constant Field Values
-
SLASH_TOKEN
public static final int SLASH_TOKEN
- See Also:
- Constant Field Values
-
SEMICOLON_TOKEN
public static final int SEMICOLON_TOKEN
- See Also:
- Constant Field Values
-
EQUALS_TOKEN
public static final int EQUALS_TOKEN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MailcapTokenizer
public MailcapTokenizer(String inputString)
Constructor
-
-
Method Detail
-
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.
-
getCurrentToken
public int getCurrentToken()
Retrieve current token.
-
nameForToken
public static String nameForToken(int token)
-
getCurrentTokenValue
public String getCurrentTokenValue()
-
nextToken
public int nextToken()
-
-