|
xmlgraphics-commons 1.5 | |||||||||
| 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 OutputStream |
out
|
| Constructor Summary | |
|---|---|
DefaultDSCHandler(OutputStream out)
Creates a new instance. |
|
| 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected OutputStream out
protected PSGenerator gen
| Constructor Detail |
|---|
public DefaultDSCHandler(OutputStream out)
out - OutputStream to pipe all received events to| Method Detail |
|---|
public void startDocument(String header)
throws IOException
DSCHandler
startDocument in interface DSCHandlerheader - the first line of the DSC-compliant file
IOException - In case of an I/O errorDSCHandler.startDocument(java.lang.String)
public void endDocument()
throws IOException
DSCHandler
endDocument in interface DSCHandlerIOException - In case of an I/O errorDSCHandler.endDocument()
public void handleDSCComment(DSCComment comment)
throws IOException
DSCHandler
handleDSCComment in interface DSCHandlercomment - the DSC comment
IOException - 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 DSCHandlerline - the line of code
IOException - In case of an I/O errorDSCHandler.line(java.lang.String)
public void comment(String comment)
throws IOException
DSCHandler
comment in interface DSCHandlercomment - the comment line
IOException - In case of an I/O errorDSCHandler.comment(java.lang.String)
|
xmlgraphics-commons 1.5 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||