Interface DSCHandler
- All Known Implementing Classes:
DefaultDSCHandler, EventRecorder
public interface DSCHandler
Interface containing events generated by the DSCParser. Applications can implement this
interface to react to certain events.
-
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.voidstartDocument(String header) Called as a new PostScript file starts.
-
Method Details
-
startDocument
Called as a new PostScript file starts.- Parameters:
header- the first line of the DSC-compliant file- Throws:
IOException- In case of an I/O error
-
endDocument
Called when the PostScript file is fully processed, i.e. after the %%EOF comment.- Throws:
IOException- In case of an I/O error
-
handleDSCComment
Called 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.- Parameters:
comment- the DSC comment- Throws:
IOException- In case of an I/O error
-
line
Called for a normal line of PostScript code.- Parameters:
line- the line of code- Throws:
IOException- In case of an I/O error
-
comment
Called for any line containing a full-line PostScript comment. This is also called for custom comments following the extension mechanism of the DSC specification.- Parameters:
comment- the comment line- Throws:
IOException- In case of an I/O error
-