Package siena.remote

Examples of siena.remote.XmlSerializer.deserialize()


   
    Document document = DocumentHelper.createDocument();
    document.addElement("root");
    serializer.serialize(document, baos);
   
    Document result = serializer.deserialize(new ByteArrayInputStream(baos.toByteArray()));
   
    assertEquals(result.getRootElement().getName(),
        document.getRootElement().getName());
  }
 
View Full Code Here


  }
 
  public void testDocumentException() {
    XmlSerializer serializer = new XmlSerializer();
    try {
      serializer.deserialize(new ByteArrayInputStream("[hello]".getBytes()));
    } catch(Exception e) {
      return;
    }
    fail("deserialize() should have been failed due to a DocumentException");
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.