Package com.rtfparserkit.parser
Class RtfListenerAdaptor
- java.lang.Object
-
- com.rtfparserkit.parser.RtfListenerAdaptor
-
- All Implemented Interfaces:
IRtfListener
- Direct Known Subclasses:
AbstractTextConverter
public class RtfListenerAdaptor extends java.lang.Object implements IRtfListener
This adaptor class is provided as a convenience for users of the IRtfListener interface. Subclass this class to provide an implementation of IRtfListener and override just the methods you need.
-
-
Constructor Summary
Constructors Constructor Description RtfListenerAdaptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidprocessBinaryBytes(byte[] data)Event raised by an RTF parser to pass binary bytes.voidprocessCharacterBytes(byte[] data)Event raised by the raw RTF parser to pass bytes representing characters.voidprocessCommand(Command command, int parameter, boolean hasParameter, boolean optional)Event raised by the RTF parser detailing a command read from the file.voidprocessDocumentEnd()Event raised when the parser reaches the end of the document.voidprocessDocumentStart()Event raised when the parser starts to read the document.voidprocessGroupEnd()Event raised when the end of a group is encountered.voidprocessGroupStart()Event raised when the stat of a group is encountered.voidprocessString(java.lang.String string)Event raised by the RTF parser to pass string data.
-
-
-
Method Detail
-
processDocumentStart
public void processDocumentStart()
Description copied from interface:IRtfListenerEvent raised when the parser starts to read the document.- Specified by:
processDocumentStartin interfaceIRtfListener
-
processDocumentEnd
public void processDocumentEnd()
Description copied from interface:IRtfListenerEvent raised when the parser reaches the end of the document.- Specified by:
processDocumentEndin interfaceIRtfListener
-
processGroupStart
public void processGroupStart()
Description copied from interface:IRtfListenerEvent raised when the stat of a group is encountered.- Specified by:
processGroupStartin interfaceIRtfListener
-
processGroupEnd
public void processGroupEnd()
Description copied from interface:IRtfListenerEvent raised when the end of a group is encountered.- Specified by:
processGroupEndin interfaceIRtfListener
-
processCharacterBytes
public void processCharacterBytes(byte[] data)
Description copied from interface:IRtfListenerEvent raised by the raw RTF parser to pass bytes representing characters. Note that these bytes will be "as read" from the RTF file, and have not been processed to account for the current encoding.- Specified by:
processCharacterBytesin interfaceIRtfListener
-
processBinaryBytes
public void processBinaryBytes(byte[] data)
Description copied from interface:IRtfListenerEvent raised by an RTF parser to pass binary bytes.- Specified by:
processBinaryBytesin interfaceIRtfListener
-
processString
public void processString(java.lang.String string)
Description copied from interface:IRtfListenerEvent raised by the RTF parser to pass string data. Note that the string has been created with the appropriate encoding and no further processing will be required.- Specified by:
processStringin interfaceIRtfListener
-
processCommand
public void processCommand(Command command, int parameter, boolean hasParameter, boolean optional)
Description copied from interface:IRtfListenerEvent raised by the RTF parser detailing a command read from the file. The parameter argument details the optional integer parameter associated with the command. If the hasParameter flag is false, the parameter argument can be ignored. If the optional flag is set, this is a command which RTF readers can choose not to implement.- Specified by:
processCommandin interfaceIRtfListener
-
-