com.lowagie.text.rtf.parser.destinations

Class RtfDestinationMgr

public final class RtfDestinationMgr extends Object

RtfDestinationMgr manages destination objects for the parser

Since: 2.0.8

Author: Howard Shank (hgshank@yahoo.com)

Field Summary
static HashMapdestinationObjects
Destination objects.
static HashMapdestinations
CtrlWord <-> Destination map object.
static StringDESTINATION_DOCUMENT
String representation of document destination.
static StringDESTINATION_NULL
String representation of null destination.
static booleanignoreUnknownDestinations
static RtfDestinationMgrinstance
static Objectlock
static RtfParserrtfParser
Constructor Summary
RtfDestinationMgr()
Hidden default constructor becuase
Method Summary
static booleanaddDestination(String destination, Object[] args)
static booleanaddListener(String destination, RtfDestinationListener listener)
Adds a RtfDestinationListener to the appropriate RtfDestination.
static RtfDestinationgetDestination(String destination)
static RtfDestinationMgrgetInstance()
static RtfDestinationMgrgetInstance(RtfParser parser)
static booleanremoveListener(String destination, RtfDestinationListener listener)
Removes a RtfDestinationListener from the appropriate RtfDestination.
static voidsetParser(RtfParser parser)

Field Detail

destinationObjects

private static HashMap destinationObjects
Destination objects. There is only one of each destination.

destinations

private static HashMap destinations
CtrlWord <-> Destination map object. Maps control words to their destinations objects. Null destination is a special destination used for discarding unwanted data. This is primarily used when skipping groups, binary data or unwanted/unknown data.

DESTINATION_DOCUMENT

public static final String DESTINATION_DOCUMENT
String representation of document destination.

DESTINATION_NULL

public static final String DESTINATION_NULL
String representation of null destination.

ignoreUnknownDestinations

private static boolean ignoreUnknownDestinations

instance

private static RtfDestinationMgr instance

lock

private static Object lock

rtfParser

private static RtfParser rtfParser

Constructor Detail

RtfDestinationMgr

private RtfDestinationMgr()
Hidden default constructor becuase

Method Detail

addDestination

public static boolean addDestination(String destination, Object[] args)

addListener

public static boolean addListener(String destination, RtfDestinationListener listener)
Adds a RtfDestinationListener to the appropriate RtfDestination.

Parameters: destination the destination string for the listener listener the new RtfDestinationListener.

getDestination

public static RtfDestination getDestination(String destination)

getInstance

public static RtfDestinationMgr getInstance()

getInstance

public static RtfDestinationMgr getInstance(RtfParser parser)

removeListener

public static boolean removeListener(String destination, RtfDestinationListener listener)
Removes a RtfDestinationListener from the appropriate RtfDestination.

Parameters: destination the destination string for the listener listener the RtfCtrlWordListener that has to be removed.

setParser

public static void setParser(RtfParser parser)