Acts as an holder for a transformation result, which may be XML, plain Text, HTML, or some other form of markup.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | FEATURE
If |
| private OutputStream | outputStream
The byte stream that is to be written to. |
| private String | systemId
The systemID that may be used in association with the byte or character stream, or, if neither is set, use this value as a writeable URI (probably a file name). |
| private Writer | writer
The character stream that is to be written to. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | StreamResult(OutputStream
A valid OutputStream reference. outputStream)Construct a StreamResult from a byte stream. |
| public | StreamResult(Writer
A valid Writer reference. writer)Construct a StreamResult from a character stream. |
| public | StreamResult(String
Must be a String that conforms to the URI syntax. systemId)Construct a StreamResult from a URL. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public OutputStream | Returns: The byte stream that was set with setOutputStream, or null if setOutputStream or the ByteStream constructor was not called.Get the byte stream that was set with setOutputStream. |
| public String | Returns: The system identifier that was set with setSystemId, or null if setSystemId was not called.Implements javax. Get the system identifier that was set with setSystemId. |
| public Writer | Returns: The character stream that was set with setWriter, or null if setWriter or the Writer constructor was not called.Get the character stream that was set with setWriter. |
| public void | setOutputStream(OutputStream
A valid OutputStream reference. outputStream)Set the ByteStream that is to be written to. |
| public void | setSystemId(String
The system identifier as a URI string. systemId)Implements javax. Set the systemID that may be used in association with the byte or character stream, or, if neither is set, use this value as a writeable URI (probably a file name). |
| public void | |
| public void |
| FEATURE | back to summary |
|---|---|
| public static final String FEATURE If | |
| outputStream | back to summary |
|---|---|
| private OutputStream outputStream The byte stream that is to be written to. | |
| systemId | back to summary |
|---|---|
| private String systemId The systemID that may be used in association with the byte or character stream, or, if neither is set, use this value as a writeable URI (probably a file name). | |
| writer | back to summary |
|---|---|
| private Writer writer The character stream that is to be written to. | |
| StreamResult | back to summary |
|---|---|
| public StreamResult() Zero-argument default constructor. | |
| StreamResult | back to summary |
|---|---|
| public StreamResult(OutputStream outputStream) Construct a StreamResult from a byte stream. Normally, a stream should be used rather than a reader, so that the transformer may use instructions contained in the transformation instructions to control the encoding.
| |
| StreamResult | back to summary |
|---|---|
| public StreamResult(Writer writer) Construct a StreamResult from a character stream. Normally, a stream should be used rather than a reader, so that the transformer may use instructions contained in the transformation instructions to control the encoding. However, there are times when it is useful to write to a character stream, such as when using a StringWriter.
| |
| StreamResult | back to summary |
|---|---|
| public StreamResult(String systemId) Construct a StreamResult from a URL.
| |
| StreamResult | back to summary |
|---|---|
| public StreamResult(File f) Construct a StreamResult from a File.
| |
| getOutputStream | back to summary |
|---|---|
| public OutputStream getOutputStream() Get the byte stream that was set with setOutputStream.
| |
| getSystemId | back to summary |
|---|---|
| public String getSystemId() Implements javax. Get the system identifier that was set with setSystemId.
| |
| getWriter | back to summary |
|---|---|
| public Writer getWriter() Get the character stream that was set with setWriter.
| |
| setOutputStream | back to summary |
|---|---|
| public void setOutputStream(OutputStream outputStream) Set the ByteStream that is to be written to. Normally, a stream should be used rather than a reader, so that the transformer may use instructions contained in the transformation instructions to control the encoding.
| |
| setSystemId | back to summary |
|---|---|
| public void setSystemId(String systemId) Implements javax. Set the systemID that may be used in association with the byte or character stream, or, if neither is set, use this value as a writeable URI (probably a file name).
| |
| setSystemId | back to summary |
|---|---|
| public void setSystemId(File f) Set the system ID from a
| |
| setWriter | back to summary |
|---|---|
| public void setWriter(Writer writer) Set the writer that is to receive the result. Normally, a stream should be used rather than a writer, so that the transformer may use instructions contained in the transformation instructions to control the encoding. However, there are times when it is useful to write to a writer, such as when using a StringWriter.
| |