Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 2.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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(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(String line)` Called for a normal line of PostScript code.
`void` | `startDocument(String header)` Called as a new PostScript file starts.

Method Detail

### 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 2.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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