public class EventRecorder extends java.lang.Object implements DSCHandler
Constructor and Description |
---|
EventRecorder() |
Modifier and Type | Method and Description |
---|---|
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 |
replay(DSCHandler handler)
Replays the recorded events to a specified DSCHandler instance.
|
void |
startDocument(java.lang.String header)
Called as a new PostScript file starts.
|
public void replay(DSCHandler handler) throws java.io.IOException
handler
- the DSCHandler to send the recorded events tojava.io.IOException
- In case of an I/O errorpublic void comment(java.lang.String comment) throws java.io.IOException
DSCHandler
comment
in interface DSCHandler
comment
- the comment linejava.io.IOException
- In case of an I/O errorDSCHandler.comment(java.lang.String)
public void handleDSCComment(DSCComment comment) throws java.io.IOException
DSCHandler
handleDSCComment
in interface DSCHandler
comment
- the DSC commentjava.io.IOException
- In case of an I/O errorDSCHandler.handleDSCComment(
org.apache.xmlgraphics.ps.dsc.events.DSCComment)
public void line(java.lang.String line) throws java.io.IOException
DSCHandler
line
in interface DSCHandler
line
- the line of codejava.io.IOException
- In case of an I/O errorDSCHandler.line(java.lang.String)
public void startDocument(java.lang.String header) throws java.io.IOException
DSCHandler
startDocument
in interface DSCHandler
header
- the first line of the DSC-compliant filejava.io.IOException
- In case of an I/O errorDSCHandler.startDocument(java.lang.String)
public void endDocument() throws java.io.IOException
DSCHandler
endDocument
in interface DSCHandler
java.io.IOException
- In case of an I/O errorDSCHandler.endDocument()
Copyright 1999-2012 The Apache Software Foundation. All Rights Reserved.