Exemplo n.º 1
0
 @Override
 public void serialize(Object object, OutputStream out) throws IOException {
   XMLSerialization xmlSerialization = XMLSerialization.getXMLSerialization();
   if (xmlSerialization == null) {
     throw new IOException("XML Serialization not initialized.");
   }
   xmlSerialization.writeXML(object, out);
 }
Exemplo n.º 2
0
 @Override
 public Object deserialize(InputStream in) throws IOException {
   XMLSerialization xmlSerialization = XMLSerialization.getXMLSerialization();
   if (xmlSerialization == null) {
     throw new IOException("XML Serialization not initialized.");
   }
   return xmlSerialization.fromXML(in);
 }