Package org.apache.xmlgraphics.ps.dsc
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 TypeMethodDescriptionvoid
Called for any line containing a full-line PostScript comment.void
Called when the PostScript file is fully processed, i.e.void
handleDSCComment
(DSCComment comment) Called for each standard DSC comment.void
Called for a normal line of PostScript code.void
startDocument
(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
-