Package net.buffalo.protocal.io

Examples of net.buffalo.protocal.io.MarshallingContext


    user.setInterests(interests);
    user.setRoles(new String[]{"SA", "Architect"});
   
    StringWriter stringWriter = new StringWriter();
    StreamWriter streamWriter = new FastStreamWriter(stringWriter);
    MarshallingContext context = new DefaultMarshallingContext(new DefaultConverterLookup(), streamWriter);
    converter.marshal(user, context, streamWriter);
    assertEquals("<map><type>net.buffalo.protocal.User</type><string>username</string><string>Michael</string>" +
        "<string>password</string><string>password</string><string>gendor</string><string>girl</string>" +
        "<string>interests</string><list><type>java.util.ArrayList</type><length>3</length>" +
        "<string>Football</string><string>Music</string><string>Cook</string></list><string>roles</string>" +
View Full Code Here


   
    StringWriter stringWriter = new StringWriter();
    StreamWriter streamWriter = new FastStreamWriter(stringWriter);
   
    DefaultConverterLookup defaultConverterLookup = new DefaultConverterLookup();
    MarshallingContext context = new DefaultMarshallingContext(defaultConverterLookup, streamWriter);
    converter.marshal(sdate, context, streamWriter);
   
    String string = "<map><type>java.sql.Date</type><string>value</string><date>20061101T000000Z</date></map>";
    assertEquals(string,
        stringWriter.getBuffer().toString());
View Full Code Here

TOP

Related Classes of net.buffalo.protocal.io.MarshallingContext

Copyright © 2018 www.massapicom. 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.