Package net.buffalo.protocal.io

Examples of net.buffalo.protocal.io.FastStreamWriter


    marshall(value, writer);
    return writer.getBuffer().toString();
  }

  public void marshall(Object value, Writer writer) {
    marshallingStrategy.marshal(value, converterLookup, new FastStreamWriter(writer));
  }
View Full Code Here


  protected void setUp() throws Exception {
    super.setUp();

    stringWriter = new StringWriter();
    streamWriter = new FastStreamWriter(stringWriter);
    context = new DefaultMarshallingContext(new DefaultConverterLookup(), streamWriter);
  }
View Full Code Here

  private DefaultConverterLookup converterLookup;

  protected void setUp() throws Exception {
    super.setUp();
    stringWriter = new StringWriter();
    streamWriter = new FastStreamWriter(stringWriter);
    converterLookup = new DefaultConverterLookup();
    marshallingContext = new DefaultMarshallingContext(converterLookup, streamWriter);
   
  }
View Full Code Here

  protected void setUp() throws Exception {
    super.setUp();
    converter = new MapConverter();
    stringWriter = new StringWriter();
    streamWriter = new FastStreamWriter(stringWriter);
    converterLookup = new DefaultConverterLookup();
    mashallingContext = new DefaultMarshallingContext(converterLookup, streamWriter);
  }
View Full Code Here

    interests.add("Cook");
    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>" +
View Full Code Here

  protected void setUp() throws Exception {
    super.setUp();

    stringWriter = new StringWriter();
    streamWriter = new FastStreamWriter(stringWriter);
    context = new DefaultMarshallingContext(new DefaultConverterLookup(), streamWriter);
  }
View Full Code Here

  private MarshallingContext mashallingContext;

  protected void setUp() throws Exception {
    super.setUp();
    stringWriter = new StringWriter();
    streamWriter = new FastStreamWriter(stringWriter);
    mashallingContext = new DefaultMarshallingContext(new DefaultConverterLookup(), streamWriter);
  }
View Full Code Here

    mashallingContext = new DefaultMarshallingContext(new DefaultConverterLookup(), streamWriter);
  }
 
  private String marshal(Converter converter, Object obj) {
    stringWriter = new StringWriter();
    streamWriter = new FastStreamWriter(stringWriter);
    converter.marshal(obj, mashallingContext, streamWriter);
    String toString = stringWriter.getBuffer().toString();
    return toString;
  }
View Full Code Here

   
    assertTrue(converter.canConvert(sdate.getClass()));
    assertFalse(converter.canConvert(java.util.Date.class));
   
    StringWriter stringWriter = new StringWriter();
    StreamWriter streamWriter = new FastStreamWriter(stringWriter);
   
    DefaultConverterLookup defaultConverterLookup = new DefaultConverterLookup();
    MarshallingContext context = new DefaultMarshallingContext(defaultConverterLookup, streamWriter);
    converter.marshal(sdate, context, streamWriter);
   
View Full Code Here

  private FastStreamWriter streamWriter;

  protected void setUp() throws Exception {
    super.setUp();
    stringWriter = new StringWriter();
    streamWriter = new FastStreamWriter(stringWriter);
    context = new DefaultMarshallingContext(new DefaultConverterLookup(), streamWriter);
    as = new ArrayConverter();
  }
View Full Code Here

TOP

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

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.