Package net.buffalo.protocal.converters.collection

Examples of net.buffalo.protocal.converters.collection.CollectionConverter.marshal()


    List list = new ArrayList();
    list.add("string1");
    list.add("string2");
   
    CollectionConverter s = new CollectionConverter();
    s.marshal(list, context, streamWriter);
    assertEquals("<list>" +
        "<type>java.util.ArrayList</type>" +
        "<length>2</length>" +
        "<string>string1</string>" +
        "<string>string2</string>" +
View Full Code Here


    List list = new LinkedList();
    list.add(new Integer(100));
    list.add(new Integer(101));
   
    CollectionConverter s = new CollectionConverter();
    s.marshal(list, context, streamWriter);
    assertEquals("<list>" +
        "<type>java.util.LinkedList</type>" +
        "<length>2</length>" +
        "<int>100</int>" +
        "<int>101</int>" +
View Full Code Here

    List list = new ArrayList();
    list.add("abdedefg");
    list.add(Boolean.TRUE);
    list.add(new Integer(100));
    list.add(new Double(9.09));
    s.marshal(list, context, streamWriter);
    assertEquals("<list>" +
        "<type>java.util.ArrayList</type>" +
        "<length>4</length>" +
        "<string>abdedefg</string>" +
        "<boolean>1</boolean>" +
View Full Code Here

    List list2 = new ArrayList();
    list2.add(new Integer(100));
    List list1 = new ArrayList();
    list1.add("man");
    list1.add(list2);
    s.marshal(list1, context, streamWriter);
    assertEquals("<list>" +
        "<type>java.util.ArrayList</type>" +
        "<length>2</length>" +
        "<string>man</string>" +
        "<list>" +
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.