/** * 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. * * @param outputStream A valid OutputStream reference. */ public StreamResult(OutputStream outputStream) { setOutputStream(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. * * @param outputStream A valid OutputStream reference. */ public StreamResult(OutputStream outputStream) { setOutputStream(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. * * @param outputStream A valid OutputStream reference. */ public StreamResult(OutputStream outputStream) { setOutputStream(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. * * @param outputStream A valid OutputStream reference. */ public StreamResult(OutputStream outputStream) { setOutputStream(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. * * @param outputStream A valid OutputStream reference. */ public StreamResult(OutputStream outputStream) { setOutputStream(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. * * @param outputStream A valid OutputStream reference. */ public StreamResult(OutputStream outputStream) { setOutputStream(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. * * @param outputStream A valid OutputStream reference. */ public StreamResult(OutputStream outputStream) { setOutputStream(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. * * @param outputStream A valid OutputStream reference. */ public StreamResult(OutputStream outputStream) { setOutputStream(outputStream); }
public ByteResult() { super(); super.setOutputStream(result); }
File f = new File(filePath); StreamResult result = new StreamResult(); FileOutputStream fos = new FileOutputStream(f); result.setOutputStream(fos);
public static void output(Node node, String encoding, OutputStream outputStream) throws TransformerException { Transformer transformer = transFactory.newTransformer(); transformer.setOutputProperty("encoding", encoding); DOMSource source = new DOMSource(); source.setNode(node); StreamResult result = new StreamResult(); result.setOutputStream(outputStream); transformer.transform(source, result); }
public final void marshal(Object pObject, OutputStream pStream) throws JAXBException { StreamResult sr = new StreamResult(); sr.setOutputStream(pStream); marshal(pObject, sr); }
public final void marshal(Object pObject, OutputStream pStream) throws JAXBException { StreamResult sr = new StreamResult(); sr.setOutputStream(pStream); marshal(pObject, sr); }
private void closeCurrentStream() { if (this.currentStream != null) { IOUtils.closeQuietly(currentStream.getOutputStream()); currentStream.setOutputStream(null); IOUtils.closeQuietly(currentStream.getWriter()); currentStream.setWriter(null); this.currentStream = null; } }
/** 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; }
/** 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; }
private StreamResult toStreamResult(OutputStream os, Writer writer, String systemId){ StreamResult sr = new StreamResult(); sr.setOutputStream(os); sr.setWriter(writer); sr.setSystemId(systemId); return sr; }
/** * Set the destination of the serialized output, as an OutputStream. * <p>Closing the output stream after use is the responsibility of the caller.</p> * <p>Calling this method has the side-effect of setting the OutputWriter and OutputFile to null.</p> * * @param stream the OutputStream to which the serialized XML output will be written. */ public void setOutputStream(OutputStream stream) { result.setWriter(null); result.setSystemId((String) null); result.setOutputStream(stream); mustClose = false; }
/** * Set the destination of the serialized output, as a File. * * <p>Calling this method has the side-effect of setting the current OutputWriter * and OutputStream to null.</p> * @param file the File to which the serialized XML output will be written. */ public void setOutputFile(File file) { result.setOutputStream(null); result.setWriter(null); result.setSystemId(file); }