Java Code Examples for javax.xml.transform.stream.StreamResult.setWriter()

The following are Jave code examples for showing how to use setWriter() of the javax.xml.transform.stream.StreamResult class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: OpenJSharp   File: XMLOutputFactoryImpl.java   Source Code and License Vote up 5 votes
/** StreamResult object is re-used and the values are set appropriately.
 */
StreamResult toStreamResult(OutputStream os, Writer writer, String systemId){
    StreamResult sr = new StreamResult();
    sr.setOutputStream(os);
    sr.setWriter(writer);
    sr.setSystemId(systemId);
    return sr;
}
 
Example 2
Project: openjdk-jdk10   File: XMLOutputFactoryImpl.java   Source Code and License Vote up 5 votes
/** StreamResult object is re-used and the values are set appropriately.
 */
StreamResult toStreamResult(OutputStream os, Writer writer, String systemId){
    StreamResult sr = new StreamResult();
    sr.setOutputStream(os);
    sr.setWriter(writer);
    sr.setSystemId(systemId);
    return sr;
}