|
xmlgraphics-commons 1.3.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.xmlgraphics.ps.dsc.DefaultDSCHandler
public class DefaultDSCHandler
Default implementation of a DSCHandler which simply passes through the PostScript content unchanged. Subclasses can implement different behaviour, for example to filter certain DSC comments or to insert PostScript code at specific places.
Field Summary | |
---|---|
protected PSGenerator |
gen
|
protected java.io.OutputStream |
out
|
Constructor Summary | |
---|---|
DefaultDSCHandler(java.io.OutputStream out)
Creates a new instance. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.OutputStream out
protected PSGenerator gen
Constructor Detail |
---|
public DefaultDSCHandler(java.io.OutputStream out)
out
- OutputStream to pipe all received events toMethod Detail |
---|
public void startDocument(java.lang.String header) throws java.io.IOException
DSCHandler
startDocument
in interface DSCHandler
header
- the first line of the DSC-compliant file
java.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()
public void handleDSCComment(DSCComment comment) throws java.io.IOException
DSCHandler
handleDSCComment
in interface DSCHandler
comment
- the DSC comment
java.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 code
java.io.IOException
- In case of an I/O errorDSCHandler.line(java.lang.String)
public void comment(java.lang.String comment) throws java.io.IOException
DSCHandler
comment
in interface DSCHandler
comment
- the comment line
java.io.IOException
- In case of an I/O errorDSCHandler.comment(java.lang.String)
|
xmlgraphics-commons 1.3.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |