public abstract class Emitter extends Object implements Result, Receiver
The interface is deliberately designed to be as close as possible to the standard SAX2 ContentHandler interface, however, it allows additional information to be made available. An Emitter is a Receiver, specifically it is a Receiver that can direct output to a Writer or OutputStream, using serialization properties defined in a Properties object.
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
allCharactersEncodable |
protected CharacterSet |
characterSet |
protected NamePool |
namePool |
protected Properties |
outputProperties |
protected OutputStream |
outputStream |
protected PipelineConfiguration |
pipelineConfig |
protected StreamResult |
streamResult |
protected String |
systemId |
protected Writer |
writer |
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING| Constructor and Description |
|---|
Emitter() |
| Modifier and Type | Method and Description |
|---|---|
Configuration |
getConfiguration()
Get the configuration used for this document
|
Properties |
getOutputProperties()
Get the output properties
|
OutputStream |
getOutputStream()
Get the output stream
|
PipelineConfiguration |
getPipelineConfiguration()
Get the pipeline configuration used for this document
|
String |
getSystemId()
Get the System ID
|
Writer |
getWriter()
Get the output writer
|
protected void |
makeWriter()
Make a Writer for this Emitter to use, given a StreamResult
|
void |
setOutputProperties(Properties details)
Set output properties
|
void |
setOutputStream(OutputStream stream)
Set the output destination as a byte stream
|
void |
setPipelineConfiguration(PipelineConfiguration pipe)
Set the pipelineConfiguration
|
void |
setStreamResult(StreamResult result)
Set the StreamResult acting as the output destination of the Emitter
|
void |
setSystemId(String systemId)
Set the System ID
|
void |
setUnparsedEntity(String name,
String uri,
String publicId)
Set unparsed entity URI.
|
void |
setWriter(Writer writer)
Set the output destination as a character stream
|
boolean |
usesWriter()
Determine whether the Emitter wants a Writer for character output or
an OutputStream for binary output.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitattribute, characters, close, comment, endDocument, endElement, namespace, open, processingInstruction, startContent, startDocument, startElementprotected PipelineConfiguration pipelineConfig
protected NamePool namePool
protected String systemId
protected StreamResult streamResult
protected Writer writer
protected OutputStream outputStream
protected Properties outputProperties
protected CharacterSet characterSet
protected boolean allCharactersEncodable
public void setPipelineConfiguration(PipelineConfiguration pipe)
setPipelineConfiguration in interface Receiverpublic PipelineConfiguration getPipelineConfiguration()
getPipelineConfiguration in interface Receiverpublic Configuration getConfiguration()
public void setSystemId(String systemId)
setSystemId in interface ResultsetSystemId in interface Receiverpublic String getSystemId()
getSystemId in interface Resultpublic void setOutputProperties(Properties details) throws XPathException
XPathExceptionpublic Properties getOutputProperties()
public void setStreamResult(StreamResult result) throws XPathException
XPathExceptionprotected void makeWriter()
throws XPathException
XPathExceptionpublic boolean usesWriter()
public void setWriter(Writer writer)
public Writer getWriter()
public void setOutputStream(OutputStream stream) throws XPathException
XPathExceptionpublic OutputStream getOutputStream()
public void setUnparsedEntity(String name, String uri, String publicId) throws XPathException
setUnparsedEntity in interface Receivername - The name of the unparsed entityuri - The system identifier of the unparsed entitypublicId - The public identifier of the unparsed entityXPathException