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 Type
    Method
    Description
    void
    comment(String comment)
    Called for any line containing a full-line PostScript comment.
    void
    Called when the PostScript file is fully processed, i.e.
    void
    Called for each standard DSC comment.
    void
    line(String line)
    Called for a normal line of PostScript code.
    void
    Called as a new PostScript file starts.
  • Method Details

    • startDocument

      void startDocument(String header) throws IOException
      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

      void endDocument() throws IOException
      Called when the PostScript file is fully processed, i.e. after the %%EOF comment.
      Throws:
      IOException - In case of an I/O error
    • handleDSCComment

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

      void line(String line) throws IOException
      Called for a normal line of PostScript code.
      Parameters:
      line - the line of code
      Throws:
      IOException - In case of an I/O error
    • comment

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