Class ContentTypeParser
- java.lang.Object
-
- org.apache.james.mime4j.field.contenttype.parser.ContentTypeParser
-
- All Implemented Interfaces:
ContentTypeParserConstants
public class ContentTypeParser extends Object implements ContentTypeParserConstants
-
-
Field Summary
Fields Modifier and Type Field Description Tokenjj_ntNext token.TokentokenCurrent token.ContentTypeParserTokenManagertoken_sourceGenerated Token Manager.-
Fields inherited from interface org.apache.james.mime4j.field.contenttype.parser.ContentTypeParserConstants
ANY, ATOKEN, COMMENT, DEFAULT, DIGITS, EOF, INCOMMENT, INQUOTEDSTRING, NESTED_COMMENT, QUOTEDPAIR, QUOTEDSTRING, tokenImage, WS
-
-
Constructor Summary
Constructors Constructor Description ContentTypeParser(InputStream stream)Constructor with InputStream.ContentTypeParser(InputStream stream, String encoding)Constructor with InputStream and supplied encodingContentTypeParser(Reader stream)Constructor.ContentTypeParser(ContentTypeParserTokenManager tm)Constructor with generated Token Manager.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisable_tracing()Disable tracing.voidenable_tracing()Enable tracing.ParseExceptiongenerateParseException()Generate ParseException.TokengetNextToken()Get the next Token.List<String>getParamNames()List<String>getParamValues()StringgetSubType()TokengetToken(int index)Get the specific Token.StringgetType()static voidmain(String[] args)voidparameter()voidparse()voidparseAll()voidparseLine()voidReInit(InputStream stream)Reinitialise.voidReInit(InputStream stream, String encoding)Reinitialise.voidReInit(Reader stream)Reinitialise.voidReInit(ContentTypeParserTokenManager tm)Reinitialise.booleantrace_enabled()Trace enabled.Stringvalue()
-
-
-
Field Detail
-
token_source
public ContentTypeParserTokenManager token_source
Generated Token Manager.
-
token
public Token token
Current token.
-
jj_nt
public Token jj_nt
Next token.
-
-
Constructor Detail
-
ContentTypeParser
public ContentTypeParser(InputStream stream)
Constructor with InputStream.
-
ContentTypeParser
public ContentTypeParser(InputStream stream, String encoding)
Constructor with InputStream and supplied encoding
-
ContentTypeParser
public ContentTypeParser(Reader stream)
Constructor.
-
ContentTypeParser
public ContentTypeParser(ContentTypeParserTokenManager tm)
Constructor with generated Token Manager.
-
-
Method Detail
-
getType
public String getType()
-
getSubType
public String getSubType()
-
main
public static void main(String[] args) throws ParseException
- Throws:
ParseException
-
parseLine
public final void parseLine() throws ParseException- Throws:
ParseException
-
parseAll
public final void parseAll() throws ParseException- Throws:
ParseException
-
parse
public final void parse() throws ParseException- Throws:
ParseException
-
parameter
public final void parameter() throws ParseException- Throws:
ParseException
-
value
public final String value() throws ParseException
- Throws:
ParseException
-
ReInit
public void ReInit(InputStream stream)
Reinitialise.
-
ReInit
public void ReInit(InputStream stream, String encoding)
Reinitialise.
-
ReInit
public void ReInit(Reader stream)
Reinitialise.
-
ReInit
public void ReInit(ContentTypeParserTokenManager tm)
Reinitialise.
-
getNextToken
public final Token getNextToken()
Get the next Token.
-
getToken
public final Token getToken(int index)
Get the specific Token.
-
generateParseException
public ParseException generateParseException()
Generate ParseException.
-
trace_enabled
public final boolean trace_enabled()
Trace enabled.
-
enable_tracing
public final void enable_tracing()
Enable tracing.
-
disable_tracing
public final void disable_tracing()
Disable tracing.
-
-