Class RTFToken
java.lang.Object
org.apache.tika.parser.microsoft.rtf.jflex.RTFToken
A single token produced by the RTF tokenizer.
Mutable and reused by the tokenizer to avoid allocation in the hot loop. Consumers must copy any data they need before requesting the next token.
For TEXT and CONTROL_SYMBOL tokens (single character), use getChar()
to avoid String allocation. For CONTROL_WORD tokens, use getName().
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchargetChar()For TEXT and CONTROL_SYMBOL tokens: the single character, without allocating a String.intgetName()For CONTROL_WORD tokens: the control word name.intgetType()booleanvoidreset(RTFTokenType type) voidset(RTFTokenType type, String name, int parameter, boolean hasParameter) voidsetChar(RTFTokenType type, char ch) toString()
-
Constructor Details
-
RTFToken
public RTFToken()
-
-
Method Details
-
reset
-
set
-
setChar
-
getType
-
getName
For CONTROL_WORD tokens: the control word name. -
getChar
public char getChar()For TEXT and CONTROL_SYMBOL tokens: the single character, without allocating a String. -
getParameter
public int getParameter() -
hasParameter
public boolean hasParameter() -
getHexValue
public int getHexValue() -
toString
-