|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.xml.transform.stream.StreamResult com.stylusstudio.converter.OutputResult
The class OutputResult is used to specify that the user of Converter
wants
the Converter to write its output to a Writer
provided by the
caller, or wants the
Converter to write its output to a OutputStream
provided by the caller
using a specified byte encoding.
The Converter never closes the Writer or OutputStream provided by the caller;
the caller must do this after the conversion is finished.
Field Summary |
Fields inherited from class javax.xml.transform.stream.StreamResult |
FEATURE |
Fields inherited from interface javax.xml.transform.Result |
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING |
Constructor Summary | |
OutputResult()
Default constructor. |
|
OutputResult(OutputStream outputStream)
Construct an OutputResult from a byte stream (OutputStream). |
|
OutputResult(String systemId)
Construct an OutputResult from a URI. |
|
OutputResult(Writer writer)
Construct an OutputResult from a character stream (Writer). |
Method Summary | |
String |
getEncoding()
Get the character encoding for a byte stream or URI. |
void |
setEncoding(String encoding)
Set the character encoding, if known. |
Methods inherited from class javax.xml.transform.stream.StreamResult |
getOutputStream, getSystemId, getWriter, setOutputStream, setSystemId, setSystemId, setWriter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OutputResult()
setWriter
to specify the Writer to be used, or call
setOutputStream
and setEncoding
to specify the OutputStream and encoding.
public OutputResult(OutputStream outputStream)
setEncoding
to specify the encoding.
outputStream
- The OutputStream created by the caller.public OutputResult(Writer writer)
OutputStreamWriter
, the Converter will is to determine the
correct encoding. Otherwise, the caller must also call setEncoding
to
specify the encoding
writer
- The Writer to which data is written.public OutputResult(String systemId)
setWriter
to specify the Writer to be used, or call
setOutputStream
and setEncoding
to specify the OutputStream and encoding.
systemId
- Must be a String that conforms to the URI syntax.Method Detail |
public void setEncoding(String encoding)
The encoding must be a valid XML encoding declaration (see section 4.3.3 of the XML 1.0 recommendation).
encoding
- A string describing the character encoding.getEncoding()
public String getEncoding()
setEncoding(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |