/** * Converts the document to a byte[]. * * @throws DOMSerializerException if error occurs. */ public byte[] serializeToBytes(final Document document) throws DOMSerializerException { return serializeToBytes((Node) document); }
public InputStream getStream() { byte[] capsDocAsBytes = DOMSerializer.createNew().serializeToBytes(m_capsDoc); ByteArrayInputStream inputStream = new ByteArrayInputStream(capsDocAsBytes); return inputStream; }