Package org.apache.xmlgraphics.ps.dsc
Class FilteringEventListener
java.lang.Object
org.apache.xmlgraphics.ps.dsc.FilteringEventListener
- All Implemented Interfaces:
DSCListener
DSCListener
implementation that filters certain DSC events.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
processEvent
(DSCEvent event, DSCParser parser) Called for each DSC event.
-
Constructor Details
-
FilteringEventListener
Main constructor.- Parameters:
filter
- the filter
-
-
Method Details
-
processEvent
Called for each DSC event. You can call methods on the DSC parser to skip comments, for example. But implementations need to be good citizens and take into account that multiple listeners can be active at the same time and that they might interfere with other listeners. When returning from the call, state information such as filters should be restored.- Specified by:
processEvent
in interfaceDSCListener
- Parameters:
event
- the DSC eventparser
- the DSC parser- Throws:
IOException
- if an I/O error occursDSCException
- if a DSC-specific error occurs
-