final byte[] contents = writer.toString().getBytes("UTF8"); extraFiles.put( result.getSystemId(), new ApplicationDescription.ExternalGrammar(
final byte[] contents = writer.toString().getBytes("UTF8"); extraFiles.put( result.getSystemId(), new ApplicationDescription.ExternalGrammar(
byte[] contents = writer.toString().getBytes( "UTF8" ); extraFiles.put( result.getSystemId() , new ApplicationDescription.ExternalGrammar(
else if (null != sresult.getOutputStream()) serializer.setOutputStream(sresult.getOutputStream()); else if (null != sresult.getSystemId()) String fileURL = sresult.getSystemId();
else if (null != sresult.getOutputStream()) serializer.setOutputStream(sresult.getOutputStream()); else if (null != sresult.getSystemId()) String fileURL = sresult.getSystemId();
else if (null != sresult.getOutputStream()) serializer.setOutputStream(sresult.getOutputStream()); else if (null != sresult.getSystemId()) String fileURL = sresult.getSystemId();
else if (sr.getOutputStream() != null) return createWriter(sr.getOutputStream()); else if (sr.getSystemId() != null) { String fileURL = sr.getSystemId();
else if (null != sresult.getOutputStream()) serializer.setOutputStream(sresult.getOutputStream()); else if (null != sresult.getSystemId()) String fileURL = sresult.getSystemId();
else if (null != sresult.getOutputStream()) serializer.setOutputStream(sresult.getOutputStream()); else if (null != sresult.getSystemId()) String fileURL = sresult.getSystemId();
final byte[] contents = writer.toString().getBytes("UTF8"); extraFiles.put( result.getSystemId(), new ApplicationDescription.ExternalGrammar(
final byte[] contents = writer.toString().getBytes("UTF8"); generatedSchemas.put( result.getSystemId(), contents); inc.setHref(result.getSystemId()); Doc doc = new Doc(); doc.setTitle("Generated");
else if (sr.getOutputStream() != null) return createWriter(sr.getOutputStream()); else if (sr.getSystemId() != null) { String fileURL = sr.getSystemId();
StreamResult sr = (StreamResult) res; out = sr.getOutputStream(); sysId = sr.getSystemId(); if (out == null) { w = sr.getWriter();
/** * Set the StreamResult acting as the output destination of the Emitter * @param result the output destination */ public void setStreamResult(StreamResult result) throws XPathException { streamResult = result; if (systemId == null) { systemId = result.getSystemId(); } }
/** * Set the StreamResult acting as the output destination of the Emitter * * @param result the output destination * @throws net.sf.saxon.trans.XPathException * if an error occurs */ public void setStreamResult(StreamResult result) throws XPathException { streamResult = result; if (systemId == null) { systemId = result.getSystemId(); } }
/** * Set the StreamResult acting as the output destination of the Emitter * * @param result the output destination * @throws net.sf.saxon.trans.XPathException * if an error occurs */ public void setStreamResult(StreamResult result) throws XPathException { streamResult = result; if (systemId == null) { systemId = result.getSystemId(); } }
/** * Serialize an XdmNode to the selected output destination using this serializer * * @param node The node to be serialized * @throws IllegalStateException if no outputStream, Writer, or File has been supplied as the * destination for the serialized output * @throws SaxonApiException if a serialization error or I/O error occurs * @since 9.3 */ public void serializeNode(XdmNode node) throws SaxonApiException { StreamResult res = result; if (res.getOutputStream() == null && res.getWriter() == null && res.getSystemId() == null) { throw new IllegalStateException("Either an outputStream, or a Writer, or a File must be supplied"); } serializeNodeToResult(node, res); }
/** * Serialize an XdmNode to the selected output destination using this serializer * * @param node The node to be serialized * @throws IllegalStateException if no outputStream, Writer, or File has been supplied as the * destination for the serialized output * @throws SaxonApiException if a serialization error or I/O error occurs * @since 9.3 */ public void serializeNode(XdmNode node) throws SaxonApiException { StreamResult res = result; if (res.getOutputStream() == null && res.getWriter() == null && res.getSystemId() == null) { throw new IllegalStateException("Either an outputStream, or a Writer, or a File must be supplied"); } serializeNodeToResult(node, res); }
public void setOutput(StreamResult streamResult, String encoding) throws IOException { if (streamResult.getOutputStream() != null) setOutput(streamResult.getOutputStream(), encoding); else if (streamResult.getWriter() != null) setOutput(streamResult.getWriter()); else if (streamResult.getSystemId() != null) setOutput(new FileOutputStream(streamResult.getSystemId()), encoding); }
/** * Use a StreamResult to initialize the output for this XMLStreamWriter. Check * for OutputStream, Writer and then systemId, in that order. * * @param sr StreamResult encapsulating output information * @param encoding Encoding to be used except when a Writer is available */ public void setOutput(StreamResult sr, String encoding) throws IOException { if (sr.getOutputStream() != null) { setOutputUsingStream(sr.getOutputStream(), encoding); } else if (sr.getWriter() != null) { setOutputUsingWriter(sr.getWriter()); } else if (sr.getSystemId() != null) { setOutputUsingStream(new FileOutputStream(sr.getSystemId()), encoding); } }