Package net.sf.jasperreports.engine.xml
Class JRXmlTemplateWriter
- java.lang.Object
-
- net.sf.jasperreports.engine.xml.JRXmlTemplateWriter
-
public class JRXmlTemplateWriter extends Object
Template
XML serializer.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
JRXmlTemplateLoader
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_ENCODING
Default XML output encoding.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
writeTemplate(JasperReportsContext jasperReportsContext, JRTemplate template)
Returns the XML representation of a template.static void
writeTemplate(JasperReportsContext jasperReportsContext, JRTemplate template, OutputStream out)
Writes the XML representation of a template to an output stream.static void
writeTemplate(JasperReportsContext jasperReportsContext, JRTemplate template, OutputStream out, String encoding)
Writes the XML representation of a template to an output stream.protected static void
writeTemplate(JasperReportsContext jasperReportsContext, JRTemplate template, Writer out, String encoding)
static String
writeTemplate(JasperReportsContext jasperReportsContext, JRTemplate template, String encoding)
Returns the XML representation of a template.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.static void
writeTemplateToFile(JasperReportsContext jasperReportsContext, JRTemplate template, String outputFile)
Writes the XML representation of a template to a file.static void
writeTemplateToFile(JasperReportsContext jasperReportsContext, JRTemplate template, String outputFile, String encoding)
Writes the XML representation of a template to a file.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.
-
-
-
Field Detail
-
DEFAULT_ENCODING
public static final String DEFAULT_ENCODING
Default XML output encoding.- See Also:
- Constant Field Values
-
-
Method Detail
-
writeTemplate
public static String writeTemplate(JRTemplate template)
Returns the XML representation of a template. Usesthe default encoding
.- Parameters:
template
- the template- Returns:
- the XML representation of the template
-
writeTemplate
public static String writeTemplate(JasperReportsContext jasperReportsContext, JRTemplate template)
Returns the XML representation of a template. Usesthe default encoding
.- Parameters:
jasperReportsContext
-template
- the template- Returns:
- the XML representation of the template
-
writeTemplate
public static String writeTemplate(JRTemplate template, String encoding)
Returns the XML representation of a template.- Parameters:
template
- the templateencoding
- the XML encoding to use- Returns:
- the XML representation of the template
-
writeTemplate
public static String writeTemplate(JasperReportsContext jasperReportsContext, JRTemplate template, String encoding)
Returns the XML representation of a template.- Parameters:
jasperReportsContext
-template
- the templateencoding
- the XML encoding to use- Returns:
- the XML representation of the template
-
writeTemplate
public static void writeTemplate(JRTemplate template, OutputStream out)
Writes the XML representation of a template to an output stream. Usesthe default encoding
.- Parameters:
template
- the templateout
- the output stream
-
writeTemplate
public static void writeTemplate(JasperReportsContext jasperReportsContext, JRTemplate template, OutputStream out)
Writes the XML representation of a template to an output stream. Usesthe default encoding
.- Parameters:
jasperReportsContext
-template
- the templateout
- the output stream
-
writeTemplate
public static void writeTemplate(JRTemplate template, OutputStream out, String encoding)
Writes the XML representation of a template to an output stream.- Parameters:
template
- the templateout
- the output streamencoding
- the XML encoding to use
-
writeTemplate
public static void writeTemplate(JasperReportsContext jasperReportsContext, JRTemplate template, OutputStream out, String encoding)
Writes the XML representation of a template to an output stream.- Parameters:
jasperReportsContext
-template
- the templateout
- the output streamencoding
- the XML encoding to use
-
writeTemplateToFile
public static void writeTemplateToFile(JRTemplate template, String outputFile)
Writes the XML representation of a template to a file. Usesthe default encoding
.- Parameters:
template
- the templateoutputFile
- the output file name
-
writeTemplateToFile
public static void writeTemplateToFile(JasperReportsContext jasperReportsContext, JRTemplate template, String outputFile)
Writes the XML representation of a template to a file. Usesthe default encoding
.- Parameters:
jasperReportsContext
-template
- the templateoutputFile
- the output file name
-
writeTemplateToFile
public static void writeTemplateToFile(JRTemplate template, String outputFile, String encoding)
Writes the XML representation of a template to a file.- Parameters:
template
- the templateoutputFile
- the output file nameencoding
- the XML encoding to use
-
writeTemplateToFile
public static void writeTemplateToFile(JasperReportsContext jasperReportsContext, JRTemplate template, String outputFile, String encoding)
Writes the XML representation of a template to a file.- Parameters:
jasperReportsContext
-template
- the templateoutputFile
- the output file nameencoding
- the XML encoding to use
-
writeTemplate
protected static void writeTemplate(JasperReportsContext jasperReportsContext, JRTemplate template, Writer out, String encoding) throws IOException
- Throws:
IOException
-
-