Package com.rtfparserkit.converter.text
Class StringTextConverter
- java.lang.Object
-
- com.rtfparserkit.parser.RtfListenerAdaptor
-
- com.rtfparserkit.converter.text.AbstractTextConverter
-
- com.rtfparserkit.converter.text.StringTextConverter
-
- All Implemented Interfaces:
IRtfListener
public class StringTextConverter extends AbstractTextConverter
This class implements a trivial RTF to text converter. The extracted text is cached in a buffer and is available to the caller using the getText() method.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringBuilderbuffer
-
Constructor Summary
Constructors Constructor Description StringTextConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconvert(IRtfSource source)java.lang.StringgetText()voidprocessExtractedText(java.lang.String text)This method is called to process the test we've extracted from the RTF file.-
Methods inherited from class com.rtfparserkit.converter.text.AbstractTextConverter
processCommand, processGroupEnd, processGroupStart, processString
-
Methods inherited from class com.rtfparserkit.parser.RtfListenerAdaptor
processBinaryBytes, processCharacterBytes, processDocumentEnd, processDocumentStart
-
-
-
-
Method Detail
-
convert
public void convert(IRtfSource source) throws java.io.IOException
- Overrides:
convertin classAbstractTextConverter- Throws:
java.io.IOException
-
processExtractedText
public void processExtractedText(java.lang.String text)
Description copied from class:AbstractTextConverterThis method is called to process the test we've extracted from the RTF file.- Specified by:
processExtractedTextin classAbstractTextConverter
-
getText
public java.lang.String getText()
-
-