public abstract class Emitter extends java.lang.Object implements javax.xml.transform.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.
?????? | ????? |
---|---|
protected boolean |
allCharactersEncodable |
protected CharacterSet |
characterSet |
protected NamePool |
namePool |
protected java.util.Properties |
outputProperties |
protected java.io.OutputStream |
outputStream |
protected PipelineConfiguration |
pipelineConfig |
protected javax.xml.transform.stream.StreamResult |
streamResult |
protected java.lang.String |
systemId |
protected java.io.Writer |
writer |
?????? |
---|
Emitter() |
?????? | ????? |
---|---|
Configuration |
getConfiguration()
Get the configuration used for this document
|
java.util.Properties |
getOutputProperties()
Get the output properties
|
java.io.OutputStream |
getOutputStream()
Get the output stream
|
PipelineConfiguration |
getPipelineConfiguration()
Get the pipeline configuration used for this document
|
java.lang.String |
getSystemId()
Get the System ID
|
java.io.Writer |
getWriter()
Get the output writer
|
protected void |
makeWriter()
Make a Writer for this Emitter to use, given a StreamResult.
|
void |
setOutputProperties(java.util.Properties details)
Set output properties
|
void |
setOutputStream(java.io.OutputStream stream)
Set the output destination as a byte stream.
|
void |
setPipelineConfiguration(PipelineConfiguration pipe)
Set the pipelineConfiguration
|
void |
setStreamResult(javax.xml.transform.stream.StreamResult result)
Set the StreamResult acting as the output destination of the Emitter
|
void |
setSystemId(java.lang.String systemId)
Set the System ID
|
void |
setUnparsedEntity(java.lang.String name,
java.lang.String uri,
java.lang.String publicId)
Set unparsed entity URI.
|
void |
setWriter(java.io.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, wait
attribute, characters, close, comment, endDocument, endElement, namespace, open, processingInstruction, startContent, startDocument, startElement
protected PipelineConfiguration pipelineConfig
protected NamePool namePool
protected java.lang.String systemId
protected javax.xml.transform.stream.StreamResult streamResult
protected java.io.Writer writer
protected java.io.OutputStream outputStream
protected java.util.Properties outputProperties
protected CharacterSet characterSet
protected boolean allCharactersEncodable
public void setPipelineConfiguration(PipelineConfiguration pipe)
setPipelineConfiguration
???? Receiver
pipe
- the pipeline configurationpublic PipelineConfiguration getPipelineConfiguration()
getPipelineConfiguration
???? Receiver
public Configuration getConfiguration()
public void setSystemId(java.lang.String systemId)
setSystemId
???? javax.xml.transform.Result
setSystemId
???? Receiver
systemId
- the system identifier (=base URI)public java.lang.String getSystemId()
getSystemId
???? javax.xml.transform.Result
public void setOutputProperties(java.util.Properties details) throws XPathException
details
- the output serialization propertiesXPathException
public java.util.Properties getOutputProperties()
public void setStreamResult(javax.xml.transform.stream.StreamResult result) throws XPathException
result
- the output destinationXPathException
protected void makeWriter() throws XPathException
XPathException
public boolean usesWriter()
public void setWriter(java.io.Writer writer) throws XPathException
writer
- the Writer to use as an output destinationXPathException
public java.io.Writer getWriter()
public void setOutputStream(java.io.OutputStream stream) throws XPathException
Note that if a specific encoding (other than the default, UTF-8) is required, then
setOutputProperties(java.util.Properties)
must be called before calling
this method.
stream
- the OutputStream being used as an output destinationXPathException
public java.io.OutputStream getOutputStream()
public void setUnparsedEntity(java.lang.String name, java.lang.String uri, java.lang.String publicId) throws XPathException
setUnparsedEntity
???? Receiver
name
- the entity nameuri
- the entity system IDpublicId
- the entity public IDXPathException