Class StructuredFieldParser
java.lang.Object
org.apache.james.mime4j.field.structured.parser.StructuredFieldParser
- All Implemented Interfaces:
StructuredFieldParserConstants
Parses generic structure fields.
Unfolds and removes comments.
-
Field Summary
FieldsModifier and TypeFieldDescriptionNext token.Current token.Generated Token Manager.Fields inherited from interface org.apache.james.mime4j.field.structured.parser.StructuredFieldParserConstants
ANY, CONTENT, DEFAULT, EOF, FOLD, INCOMMENT, INQUOTEDSTRING, NESTED_COMMENT, QUOTEDPAIR, QUOTEDSTRING, STRING_CONTENT, tokenImage, WS -
Constructor Summary
ConstructorsConstructorDescriptionStructuredFieldParser(InputStream stream) Constructor with InputStream.StructuredFieldParser(InputStream stream, String encoding) Constructor with InputStream and supplied encodingStructuredFieldParser(Reader stream) Constructor.Constructor with generated Token Manager. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidDisable tracing.final voidEnable tracing.Generate ParseException.final TokenGet the next Token.final TokengetToken(int index) Get the specific Token.booleanShould the \r\n folding sequence be preserved?parse()Unfolds the input and removes comments.voidReInit(InputStream stream) Reinitialise.voidReInit(InputStream stream, String encoding) Reinitialise.voidReinitialise.voidReinitialise.voidsetFoldingPreserved(boolean preserveFolding) Sets whether the \r\n folding sequence should be preserved.final booleanTrace enabled.
-
Field Details
-
token_source
Generated Token Manager. -
token
Current token. -
jj_nt
Next token.
-
-
Constructor Details
-
StructuredFieldParser
Constructor with InputStream. -
StructuredFieldParser
Constructor with InputStream and supplied encoding -
StructuredFieldParser
Constructor. -
StructuredFieldParser
Constructor with generated Token Manager.
-
-
Method Details
-
isFoldingPreserved
public boolean isFoldingPreserved()Should the \r\n folding sequence be preserved? -
setFoldingPreserved
public void setFoldingPreserved(boolean preserveFolding) Sets whether the \r\n folding sequence should be preserved. -
parse
Unfolds the input and removes comments.- Returns:
- unfolded header value with comments removed
- Throws:
ParseException
-
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
getNextToken
Get the next Token. -
getToken
Get the specific Token. -
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.
-