/** * Create a Serializer * * @return a new Serializer * @since 9.3 */ /*@NotNull*/ public Serializer newSerializer() { return new Serializer(this); }
/** * Create a Serializer * * @return a new Serializer * @since 9.3 */ /*@NotNull*/ public Serializer newSerializer() { return new Serializer(this); }
/** * Create a Serializer initialized to write to a given File. * * @param file The File to which the Serializer will write * @return a new Serializer * @since 9.3 */ /*@NotNull*/ public Serializer newSerializer(File file) { Serializer s = new Serializer(this); s.setOutputFile(file); return s; }
/** * Create a Serializer initialized to write to a given File. * * @param file The File to which the Serializer will write * @return a new Serializer * @since 9.3 */ /*@NotNull*/ public Serializer newSerializer(File file) { Serializer s = new Serializer(this); s.setOutputFile(file); return s; }
/** * Create a Serializer initialized to write to a given Writer. * <p>Closing the writer after use is the responsibility of the caller.</p> * * @param writer The Writer to which the Serializer will write * @return a new Serializer * @since 9.3 */ /*@NotNull*/ public Serializer newSerializer(Writer writer) { Serializer s = new Serializer(this); s.setOutputWriter(writer); return s; }
/** * Create a Serializer initialized to write to a given OutputStream. * <p>Closing the output stream after use is the responsibility of the caller.</p> * * @param stream The OutputStream to which the Serializer will write * @return a new Serializer * @since 9.3 */ /*@NotNull*/ public Serializer newSerializer(OutputStream stream) { Serializer s = new Serializer(this); s.setOutputStream(stream); return s; }
/** * Create a Serializer initialized to write to a given OutputStream. * <p>Closing the output stream after use is the responsibility of the caller.</p> * * @param stream The OutputStream to which the Serializer will write * @return a new Serializer * @since 9.3 */ /*@NotNull*/ public Serializer newSerializer(OutputStream stream) { Serializer s = new Serializer(this); s.setOutputStream(stream); return s; }
/** * Create a Serializer initialized to write to a given Writer. * <p>Closing the writer after use is the responsibility of the caller.</p> * * @param writer The Writer to which the Serializer will write * @return a new Serializer * @since 9.3 */ /*@NotNull*/ public Serializer newSerializer(Writer writer) { Serializer s = new Serializer(this); s.setOutputWriter(writer); return s; }
public Serializer checkoutSerializer() { Serializer serializer = serializerPool.poll(); if (serializer == null) { serializer = new Serializer(); serializer.setOutputProperty(Serializer.Property.ENCODING, "utf-8"); serializer.setOutputProperty(Serializer.Property.BYTE_ORDER_MARK, "no"); serializer.setOutputProperty(Serializer.Property.OMIT_XML_DECLARATION, "yes"); } return serializer; }
/** * Transforms a standard SVRL report to a plain text representation that * only includes rule violations (positive or negative assertion failures). * * @param svrlSource * The source for reading the SVRL report. * @return A StreamResult holding the plain text output (as a byte stream), * or null if the transformation failed. */ StreamResult generateTextResult(Source svrlSource) { XsltCompiler compiler = processor.newXsltCompiler(); StreamResult result = null; try { XsltExecutable exec = compiler.compile(new StreamSource(getClass().getResourceAsStream("svrl2text.xsl"))); XsltTransformer transformer = exec.load(); transformer.setSource(svrlSource); Serializer serializer = new Serializer(); serializer.setOutputProperty(Serializer.Property.OMIT_XML_DECLARATION, "yes"); ByteArrayOutputStream bos = new ByteArrayOutputStream(); serializer.setOutputStream(bos); transformer.setDestination(serializer); transformer.transform(); result = new StreamResult(bos); } catch (SaxonApiException e) { LOGR.warning(e.getMessage()); } return result; }
Serializer out = new Serializer(); out.setOutputProperty(Serializer.Property.INDENT, "yes"); File fileOut = File.createTempFile("serializer", "convert");
Serializer generatorSerializer = new Serializer(); generatorSerializer.setOutputFile(indexFile); generatorTransformer.setDestination(generatorSerializer);
Serializer out = new Serializer(); out.setOutputProperty(Serializer.Property.METHOD, "xml"); out.setOutputProperty(Serializer.Property.INDENT, "yes");
Serializer generatorSerializer = new Serializer(); generatorSerializer.setOutputFile(indexFile); generatorTransformer.setDestination(generatorSerializer);
getTestServletURL())); StringWriter sw = new StringWriter(); Serializer serializer = new Serializer(); serializer.setOutputWriter(sw); serializer.setOutputProperty(Serializer.Property.OMIT_XML_DECLARATION,
Serializer out = new Serializer(); out.setOutputProperty(Serializer.Property.METHOD, "xml"); out.setOutputProperty(Serializer.Property.INDENT, "yes");
Serializer out = new Serializer(); out.setOutputProperty(Serializer.Property.INDENT, "yes"); FileOutputStream fos = new FileOutputStream(outFile);
getTestServletURL())); StringWriter sw = new StringWriter(); Serializer serializer = new Serializer(); serializer.setOutputWriter(sw); serializer.setOutputProperty(Serializer.Property.OMIT_XML_DECLARATION,