xmlgraphics-commons 1.4

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
 void comment(java.lang.String comment)
          Called for any line containing a full-line PostScript comment.
 void endDocument()
          Called when the PostScript file is fully processed, i.e.
 void handleDSCComment(DSCComment comment)
          Called for each standard DSC comment.
 void line(java.lang.String line)
          Called for a normal line of PostScript code.
 void startDocument(java.lang.String header)
          Called as a new PostScript file starts.
 

Method Detail

startDocument

void startDocument(java.lang.String header)
                   throws java.io.IOException
Called as a new PostScript file starts.

Parameters:
header - the first line of the DSC-compliant file
Throws:
java.io.IOException - In case of an I/O error

endDocument

void endDocument()
                 throws java.io.IOException
Called when the PostScript file is fully processed, i.e. after the %%EOF comment.

Throws:
java.io.IOException - In case of an I/O error

handleDSCComment

void handleDSCComment(DSCComment comment)
                      throws java.io.IOException
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:
java.io.IOException - In case of an I/O error

line

void line(java.lang.String line)
          throws java.io.IOException
Called for a normal line of PostScript code.

Parameters:
line - the line of code
Throws:
java.io.IOException - In case of an I/O error

comment

void comment(java.lang.String comment)
             throws java.io.IOException
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:
java.io.IOException - In case of an I/O error

xmlgraphics-commons 1.4

Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.