Class 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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void processBinaryBytes​(byte[] data)
      Event raised by an RTF parser to pass binary bytes.
      void processCharacterBytes​(byte[] data)
      Event raised by the raw RTF parser to pass bytes representing characters.
      void processCommand​(Command command, int parameter, boolean hasParameter, boolean optional)
      Event raised by the RTF parser detailing a command read from the file.
      void processDocumentEnd()
      Event raised when the parser reaches the end of the document.
      void processDocumentStart()
      Event raised when the parser starts to read the document.
      void processGroupEnd()
      Event raised when the end of a group is encountered.
      void processGroupStart()
      Event raised when the stat of a group is encountered.
      void processString​(java.lang.String string)
      Event raised by the RTF parser to pass string data.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RtfListenerAdaptor

        public RtfListenerAdaptor()
    • Method Detail

      • processDocumentStart

        public void processDocumentStart()
        Description copied from interface: IRtfListener
        Event raised when the parser starts to read the document.
        Specified by:
        processDocumentStart in interface IRtfListener
      • processDocumentEnd

        public void processDocumentEnd()
        Description copied from interface: IRtfListener
        Event raised when the parser reaches the end of the document.
        Specified by:
        processDocumentEnd in interface IRtfListener
      • processGroupStart

        public void processGroupStart()
        Description copied from interface: IRtfListener
        Event raised when the stat of a group is encountered.
        Specified by:
        processGroupStart in interface IRtfListener
      • processGroupEnd

        public void processGroupEnd()
        Description copied from interface: IRtfListener
        Event raised when the end of a group is encountered.
        Specified by:
        processGroupEnd in interface IRtfListener
      • processCharacterBytes

        public void processCharacterBytes​(byte[] data)
        Description copied from interface: IRtfListener
        Event 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:
        processCharacterBytes in interface IRtfListener
      • processBinaryBytes

        public void processBinaryBytes​(byte[] data)
        Description copied from interface: IRtfListener
        Event raised by an RTF parser to pass binary bytes.
        Specified by:
        processBinaryBytes in interface IRtfListener
      • processString

        public void processString​(java.lang.String string)
        Description copied from interface: IRtfListener
        Event 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:
        processString in interface IRtfListener
      • processCommand

        public void processCommand​(Command command,
                                   int parameter,
                                   boolean hasParameter,
                                   boolean optional)
        Description copied from interface: IRtfListener
        Event 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:
        processCommand in interface IRtfListener