|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lowagie.text.rtf.direct.RtfTokeniser
public class RtfTokeniser
The RtfTokeniser takes an RTF document stream and turns it into a set of RTF tokens. Five groups of tokens are differentiated:
Field Summary | |
---|---|
private int |
groupLevel
The current group nesting level. |
private RtfParser |
rtfParser
The RtfParser to send tokens to. |
private int |
state
The current state of this RtfTokeniser. |
private static int |
TOKENISER_STATE_IN_CTRL_WORD
The RtfTokeniser is currently tokenising a control word. |
private static int |
TOKENISER_STATE_IN_TEXT
The RtfTokeniser is currently tokenising a text. |
private static int |
TOKENISER_STATE_READY
The RtfTokeniser is in its ground state. |
private static int |
TOKENISER_STATE_SLASH
The last token parsed was a slash. |
Constructor Summary | |
---|---|
RtfTokeniser(RtfParser rtfParser,
int startGroupLevel)
Constructs a new RtfTokeniser. |
Method Summary | |
---|---|
void |
tokenise(Reader reader)
The main tokenisation method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int TOKENISER_STATE_READY
private static final int TOKENISER_STATE_SLASH
private static final int TOKENISER_STATE_IN_CTRL_WORD
private static final int TOKENISER_STATE_IN_TEXT
private int state
private int groupLevel
private RtfParser rtfParser
Constructor Detail |
---|
public RtfTokeniser(RtfParser rtfParser, int startGroupLevel)
rtfParser
- The RtfParser to send tokens to.startGroupLevel
- The starting group nesting level. 0 for full documents, 1 for fragments.Method Detail |
---|
public void tokenise(Reader reader) throws IOException
reader
- The Reader to read the RTF document from.
IOException
- On I/O errors.
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |