/** * Marshall the signed document to an output stream * * @param signedDocument * @param os * @throws TransformerException */ public static void marshall(Document signedDocument, OutputStream os) throws TransformerException { TransformerFactory tf = TransformerUtil.getTransformerFactory(); Transformer trans = tf.newTransformer(); trans.transform(DocumentUtil.getXMLSource(signedDocument), new StreamResult(os)); }