public class DefaultDSCHandler extends Object implements DSCHandler
Modifier and Type | Field and Description |
---|---|
protected PSGenerator |
gen |
protected OutputStream |
out |
Constructor and Description |
---|
DefaultDSCHandler(OutputStream out)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
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.
|
protected OutputStream out
protected PSGenerator gen
public DefaultDSCHandler(OutputStream out)
out
- OutputStream to pipe all received events topublic void startDocument(String header) throws IOException
DSCHandler
startDocument
in interface DSCHandler
header
- the first line of the DSC-compliant fileIOException
- In case of an I/O errorDSCHandler.startDocument(java.lang.String)
public void endDocument() throws IOException
DSCHandler
endDocument
in interface DSCHandler
IOException
- In case of an I/O errorDSCHandler.endDocument()
public void handleDSCComment(DSCComment comment) throws IOException
DSCHandler
handleDSCComment
in interface DSCHandler
comment
- the DSC commentIOException
- In case of an I/O errorDSCHandler.handleDSCComment(
org.apache.xmlgraphics.ps.dsc.events.DSCComment)
public void line(String line) throws IOException
DSCHandler
line
in interface DSCHandler
line
- the line of codeIOException
- In case of an I/O errorDSCHandler.line(java.lang.String)
public void comment(String comment) throws IOException
DSCHandler
comment
in interface DSCHandler
comment
- the comment lineIOException
- In case of an I/O errorDSCHandler.comment(java.lang.String)
Copyright 1999-2015 The Apache Software Foundation. All Rights Reserved.