Class FieldsMetadataXMLSerializer
java.lang.Object
fr.opensagres.xdocreport.template.formatter.FieldsMetadataXMLSerializer
Fields metadata serializer used to load
FieldsMetadata from XML and serialize FieldsMetadata to XML.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FieldsMetadataXMLSerializerload(InputStream inputStream) Load fields metadata in the givenFieldsMetadatafrom the given XML reader.Load fields metadata in the givenFieldsMetadatafrom the given XML reader.voidsave(FieldsMetadata fieldsMetadata, OutputStream out, boolean indent, boolean formatAsJavaString) Serialize as XML the givenFieldsMetadatato the given XML output stream.voidsave(FieldsMetadata fieldsMetadata, Writer writer) Serialize as XML the givenFieldsMetadatato the given XML writer.voidsave(FieldsMetadata fieldsMetadata, Writer writer, boolean indent) Serialize as XML the givenFieldsMetadatato the given XML writer.voidsave(FieldsMetadata fieldsMetadata, Writer writer, boolean indent, boolean formatAsJavaString) Serialize as XML the givenFieldsMetadatato the given XML writer.
-
Constructor Details
-
FieldsMetadataXMLSerializer
protected FieldsMetadataXMLSerializer()
-
-
Method Details
-
getInstance
-
load
Load fields metadata in the givenFieldsMetadatafrom the given XML reader. Here a sample of XML reader :- Parameters:
inputStream- the reader of the XML fields.- Throws:
SAXExceptionIOException
-
load
Load fields metadata in the givenFieldsMetadatafrom the given XML reader. Here a sample of XML reader :- Parameters:
inputStream- the input stream of the XML fields.- Throws:
SAXExceptionIOException
-
save
Serialize as XML the givenFieldsMetadatato the given XML writer. Here a sample of XML writer :- Parameters:
fieldsMetadata- the metadata to serialize to XML.writer- the writer.- Throws:
IOException
-
save
Serialize as XML the givenFieldsMetadatato the given XML writer. Here a sample of XML writer :- Parameters:
fieldsMetadata- the metadata to serialize to XML.writer- the writer.indent- true if indent must be managed and false otherwise.- Throws:
IOException
-
save
public void save(FieldsMetadata fieldsMetadata, Writer writer, boolean indent, boolean formatAsJavaString) throws IOException Serialize as XML the givenFieldsMetadatato the given XML writer. Here a sample of XML writer :- Parameters:
fieldsMetadata- the metadata to serialize to XML.writer- the writer.indent- true if indent must be managed and false otherwise.formatAsJavaString- true if format as Java String to be done and false otherwise.- Throws:
IOException
-
save
public void save(FieldsMetadata fieldsMetadata, OutputStream out, boolean indent, boolean formatAsJavaString) throws IOException Serialize as XML the givenFieldsMetadatato the given XML output stream. Here a sample of XML writer :- Parameters:
fieldsMetadata- the metadata to serialize to XML.outputstream- the output steam.indent- true if indent must be managed and false otherwise.formatAsJavaString- true if format as Java String to be done and false otherwise. * @throws IOException- Throws:
IOException
-