public class DefaultDSCHandler extends java.lang.Object implements DSCHandler
| Modifier and Type | Field and Description |
|---|---|
protected PSGenerator |
gen |
protected java.io.OutputStream |
out |
| Constructor and Description |
|---|
DefaultDSCHandler(java.io.OutputStream out)
Creates a new instance.
|
| 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 |
startDocument(java.lang.String header)
Called as a new PostScript file starts.
|
protected java.io.OutputStream out
protected PSGenerator gen
public DefaultDSCHandler(java.io.OutputStream out)
out - OutputStream to pipe all received events topublic void startDocument(java.lang.String header)
throws java.io.IOException
DSCHandlerstartDocument in interface DSCHandlerheader - 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
DSCHandlerendDocument in interface DSCHandlerjava.io.IOException - In case of an I/O errorDSCHandler.endDocument()public void handleDSCComment(DSCComment comment) throws java.io.IOException
DSCHandlerhandleDSCComment in interface DSCHandlercomment - 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
DSCHandlerline in interface DSCHandlerline - the line of codejava.io.IOException - In case of an I/O errorDSCHandler.line(java.lang.String)public void comment(java.lang.String comment)
throws java.io.IOException
DSCHandlercomment in interface DSCHandlercomment - the comment linejava.io.IOException - In case of an I/O errorDSCHandler.comment(java.lang.String)Copyright 1999-2025 The Apache Software Foundation. All Rights Reserved.