public abstract class Stax2Result extends Object implements Result
Result) that Stax2
XMLInputFactory2 implementations should support.
Note about usage by the parser factory implementations: the expectation
is that at least one of methods constructWriter() and
constructOutputStream() will succeed, but not necessarily both.
This generally depends on type of resource being represented: for example,
if the source is a StringBuffer, it is most naturally
represent via Writer. For File-backed results, on the other hand,
an OutputStream is the most natural access method.
Other things to note about using result Writers and
OutputStreams:
Writer and
OutputStream instances requested. That is, caller owns
these accessor objects.
| Modifier and Type | Field and Description |
|---|---|
protected String |
mEncoding |
protected String |
mPublicId |
protected String |
mSystemId |
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING| Modifier | Constructor and Description |
|---|---|
protected |
Stax2Result() |
| Modifier and Type | Method and Description |
|---|---|
abstract OutputStream |
constructOutputStream()
This method creates an
OutputStream via which underlying output
target can be written to. |
abstract Writer |
constructWriter()
This method creates a
Writer via which underlying output
target can be written to. |
String |
getEncoding() |
String |
getPublicId() |
String |
getSystemId() |
void |
setEncoding(String enc) |
void |
setPublicId(String id) |
void |
setSystemId(String id) |
protected String mSystemId
protected String mPublicId
protected String mEncoding
public String getSystemId()
getSystemId in interface Resultpublic void setSystemId(String id)
setSystemId in interface Resultpublic String getPublicId()
public void setPublicId(String id)
public String getEncoding()
public void setEncoding(String enc)
public abstract Writer constructWriter() throws IOException
Writer via which underlying output
target can be written to. Note that caller is responsible for
closing that Writer when it is done reading it.IOExceptionpublic abstract OutputStream constructOutputStream() throws IOException
OutputStream via which underlying output
target can be written to. Note that caller is responsible for
closing that OutputStream when it is done reading itIOExceptionCopyright © 2015 fasterxml.com. All Rights Reserved.