public class DefaultNestedDocumentHandler extends Object implements DSCParserConstants, NestedDocumentHandler, DSCListener
DSCListener
implementation which automatically skips data
between Begin/EndDocument and Begin/EndData.COMMENT, DSC_COMMENT, EOF, HEADER_COMMENT, LINE
Constructor and Description |
---|
DefaultNestedDocumentHandler(PSGenerator gen)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
handle(DSCEvent event,
DSCParser parser)
Handle a DSC event.
|
void |
processEvent(DSCEvent event,
DSCParser parser)
Called for each DSC event.
|
public DefaultNestedDocumentHandler(PSGenerator gen)
gen
- PSGenerator to pass through the skipped contentpublic void handle(DSCEvent event, DSCParser parser) throws IOException, DSCException
handle
in interface NestedDocumentHandler
event
- the DSC event to handleparser
- the DSC parser to work withIOException
- In case of an I/O errorDSCException
- In case of a violation of the DSC specpublic void processEvent(DSCEvent event, DSCParser parser) throws IOException, DSCException
processEvent
in interface DSCListener
event
- the DSC eventparser
- the DSC parserIOException
- if an I/O error occursDSCException
- if a DSC-specific error occursCopyright © 2021 Apache Software Foundation. All rights reserved.