public class JRXmlTemplateWriter extends JRXmlBaseWriter
Template
XML serializer.JRXmlTemplateLoader
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_ENCODING
Default XML output encoding.
|
PROPERTY_REPORT_VERSION, version, versionComparator, writer
Constructor and Description |
---|
JRXmlTemplateWriter(JRTemplate template,
Writer out,
String encoding)
Creates an XML template writer.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
toWriteConditionalStyles()
Decides whether conditional styles are to be written.
|
void |
write()
Writes the template to the output writer.
|
protected void |
writeIncludedTemplate(JRTemplateReference reference) |
protected void |
writeIncludedTemplates() |
protected void |
writeStyles() |
static String |
writeTemplate(JRTemplate template)
Returns the XML representation of a template.
|
static void |
writeTemplate(JRTemplate template,
OutputStream out)
Writes the XML representation of a template to an output stream.
|
static void |
writeTemplate(JRTemplate template,
OutputStream out,
String encoding)
Writes the XML representation of a template to an output stream.
|
static String |
writeTemplate(JRTemplate template,
String encoding)
Returns the XML representation of a template.
|
protected static void |
writeTemplate(JRTemplate template,
Writer out,
String encoding) |
static void |
writeTemplateToFile(JRTemplate template,
String outputFile)
Writes the XML representation of a template to a file.
|
static void |
writeTemplateToFile(JRTemplate template,
String outputFile,
String encoding)
Writes the XML representation of a template to a file.
|
isNewerVersionOrEqual, isOlderVersionThan, useWriter, writeBox, writeBox, writeConditionalStyle, writeExpression, writeParagraph, writeParagraph, writePen, writeStyle, writeStyleReferenceAttr, writeTabStop
public static final String DEFAULT_ENCODING
public JRXmlTemplateWriter(JRTemplate template, Writer out, String encoding)
template
- the template to writeout
- the output writerencoding
- the XML encoding to usepublic static String writeTemplate(JRTemplate template)
the default encoding
.template
- the templatepublic static String writeTemplate(JRTemplate template, String encoding)
template
- the templateencoding
- the XML encoding to usepublic static void writeTemplate(JRTemplate template, OutputStream out)
the default encoding
.template
- the templateout
- the output streampublic static void writeTemplate(JRTemplate template, OutputStream out, String encoding)
template
- the templateout
- the output streamencoding
- the XML encoding to usepublic static void writeTemplateToFile(JRTemplate template, String outputFile)
the default encoding
.template
- the templateoutputFile
- the output file namepublic static void writeTemplateToFile(JRTemplate template, String outputFile, String encoding)
template
- the templateoutputFile
- the output file nameencoding
- the XML encoding to useprotected static void writeTemplate(JRTemplate template, Writer out, String encoding) throws IOException
IOException
public void write() throws IOException
IOException
protected void writeIncludedTemplates() throws IOException
IOException
protected void writeIncludedTemplate(JRTemplateReference reference) throws IOException
IOException
protected void writeStyles() throws IOException
IOException
protected boolean toWriteConditionalStyles()
JRXmlBaseWriter
toWriteConditionalStyles
in class JRXmlBaseWriter
Copyright © 2016. All rights reserved.