java.lang.Object
org.apache.xmlgraphics.ps.dsc.EventRecorder
- All Implemented Interfaces:
DSCHandler
DSCHandler implementation that records DSC events.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled for any line containing a full-line PostScript comment.voidCalled when the PostScript file is fully processed, i.e.voidhandleDSCComment(DSCComment comment) Called for each standard DSC comment.voidCalled for a normal line of PostScript code.voidreplay(DSCHandler handler) Replays the recorded events to a specified DSCHandler instance.voidstartDocument(String header) Called as a new PostScript file starts.
-
Constructor Details
-
EventRecorder
public EventRecorder()
-
-
Method Details
-
replay
Replays the recorded events to a specified DSCHandler instance.- Parameters:
handler- the DSCHandler to send the recorded events to- Throws:
IOException- In case of an I/O error
-
comment
Description copied from interface:DSCHandlerCalled for any line containing a full-line PostScript comment. This is also called for custom comments following the extension mechanism of the DSC specification.- Specified by:
commentin interfaceDSCHandler- Parameters:
comment- the comment line- Throws:
IOException- In case of an I/O error- See Also:
-
handleDSCComment
Description copied from interface:DSCHandlerCalled for each standard DSC comment. The classes passed to this method may be simple DSCComment classes or special subclasses for some of the DSC comments.- Specified by:
handleDSCCommentin interfaceDSCHandler- Parameters:
comment- the DSC comment- Throws:
IOException- In case of an I/O error- See Also:
-
line
Description copied from interface:DSCHandlerCalled for a normal line of PostScript code.- Specified by:
linein interfaceDSCHandler- Parameters:
line- the line of code- Throws:
IOException- In case of an I/O error- See Also:
-
startDocument
Description copied from interface:DSCHandlerCalled as a new PostScript file starts.- Specified by:
startDocumentin interfaceDSCHandler- Parameters:
header- the first line of the DSC-compliant file- Throws:
IOException- In case of an I/O error- See Also:
-
endDocument
Description copied from interface:DSCHandlerCalled when the PostScript file is fully processed, i.e. after the %%EOF comment.- Specified by:
endDocumentin interfaceDSCHandler- Throws:
IOException- In case of an I/O error- See Also:
-