public class ByteArrayParser
extends java.lang.Object
implements org.ai_heuristic.def.ParserDef
ByteArray
to or from XML.
NOTE: if the byte array contents are encoded, they are not decoded during the parsing.
An extra explicit operation is required at the end to decode the string from Base64.Constructor and Description |
---|
ByteArrayParser()
Creates a new instance of ByteArrayParser
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
parse(org.licas_xml.abs.Element toParse)
Parse an XML description of a
ByteArray object back into a Java object. |
org.licas_xml.abs.Element |
serialize(java.lang.Object toSerialize)
Serialize a
ByteArray object to XML. |
public ByteArrayParser()
public org.licas_xml.abs.Element serialize(java.lang.Object toSerialize) throws java.lang.Exception
ByteArray
object to XML.serialize
in interface org.ai_heuristic.def.ParserDef
toSerialize
- the ByteArray object to serialize.java.lang.Exception
- any error.public java.lang.Object parse(org.licas_xml.abs.Element toParse) throws java.lang.Exception
ByteArray
object back into a Java object.parse
in interface org.ai_heuristic.def.ParserDef
toParse
- the XML description to parse.java.lang.Exception
- any error.