Class XMLSerializer
java.lang.Object
com.inductiveautomation.ignition.common.xmlserialization.serialization.XMLSerializer
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd another object to serializevoidaddRootAttribute(String key, String value) Merges the given attribute for the root element into the existing attributes (if any).voidaddSerializationDelegate(Class clazz, SerializationDelegate<?> delegate) voidaddSupertypeDelegate(Class clazz, SerializationDelegate<?> delegate) protected ElementcreateTopElement(List<Element> elements) Calls getClassNameMap().addDefaults() in a chaining invocation style.voidregisterEqualityDelegate(Class<?> clazz, EqualityDelegate<?> delegate) Deprecated.voidserialize(SerializationWriter writer) Serializes the object graph to the given serialization writer.voidserialize(OutputStream out) Deprecated.useserializeXML(OutputStream, String)instead.voidserialize(OutputStream out, String encoding) Deprecated.useserializeXML(OutputStream, String)instead.voidDeprecated.useserializeXML(Writer, String)instead.voidDeprecated.useserializeXML(Writer, String)instead.byte[]Deprecated.useserializeXMLAndGZip()instead.byte[]serializeAndGZip(Object obj) Deprecated.useserializeXMLAndGZip(Object)instead.byte[]serializeBinary(boolean gzip) Serialize using the binary format.voidserializeBinary(OutputStream stream) Serializes the added object(s) to the stream, and closes the stream.byte[]serializeBinary(Object object, boolean gzip) Serialize the given object using binary format.Serialize to non-compressed XML using the default encoding (UTF-8)voidserializeXML(OutputStream out, String encoding) Serialize to XML format using the specified encoding.voidserializeXML(Writer out, String encoding) Serialize to XML format using the specified encoding.byte[]Serializes and gzips using UTF-8 encodingbyte[]Convenience shortcut for:static voidsetCleanCopy(Class type, Object obj) 
- 
Field Details- 
DEFAULT_ENCODING
 
- 
- 
Constructor Details- 
XMLSerializerpublic XMLSerializer()
 
- 
- 
Method Details- 
initDefaultsCalls getClassNameMap().addDefaults() in a chaining invocation style.
- 
addRootAttributeMerges the given attribute for the root element into the existing attributes (if any). These attributes can be read on the deserialization side without needing to deserialize the entire structure.
- 
addSerializationDelegate
- 
addSupertypeDelegate
- 
addObjectAdd another object to serialize
- 
serializeAndGZipDeprecated.useserializeXMLAndGZip(Object)instead.- Throws:
- SerializationException
 
- 
serializeAndGZipDeprecated.useserializeXMLAndGZip()instead.- Throws:
- SerializationException
 
- 
serializeXMLAndGZipConvenience shortcut for:serializer.addObject(obj); return serializer.serializeXMLAndGZip(); - Throws:
- SerializationException
 
- 
serializeXMLAndGZipSerializes and gzips using UTF-8 encoding- Throws:
- SerializationException
 
- 
serializeDeprecated.UseserializeXML()instead.- Throws:
- SerializationException
 
- 
serializeDeprecated.useserializeXML(OutputStream, String)instead.- Throws:
- SerializationException
 
- 
serializeDeprecated.useserializeXML(OutputStream, String)instead.- Throws:
- SerializationException
 
- 
serializeDeprecated.useserializeXML(Writer, String)instead.- Throws:
- SerializationException
 
- 
serializeDeprecated.useserializeXML(Writer, String)instead.- Throws:
- SerializationException
 
- 
serializeXMLSerialize to non-compressed XML using the default encoding (UTF-8)- Throws:
- SerializationException
 
- 
serializeXMLSerialize to XML format using the specified encoding.- Throws:
- SerializationException
 
- 
serializeXMLSerialize to XML format using the specified encoding.- Throws:
- SerializationException
 
- 
serializeBinarySerialize the given object using binary format. Shortcut for:serializer.addObject(object); serializer.serializeBinary(gzipFlag); - Throws:
- SerializationException
 
- 
serializeBinarySerialize using the binary format. Optional gzip compression.- Throws:
- SerializationException
 
- 
serializeBinarySerializes the added object(s) to the stream, and closes the stream.- Throws:
- SerializationException
 
- 
serializeSerializes the object graph to the given serialization writer.- Throws:
- SerializationException
 
- 
createTopElement
- 
setCleanCopy
- 
getClassNameMap
- 
registerEqualityDelegate
 
- 
serializeXML()instead.