Package net.buffalo.protocal.io

Examples of net.buffalo.protocal.io.FastStreamReader


  public void marshall(Object value, Writer writer) {
    marshallingStrategy.marshal(value, converterLookup, new FastStreamWriter(writer));
  }
 
  public BuffaloCall unmarshall(Reader reader) {
    return marshallingStrategy.unmarshal(new FastStreamReader(reader), converterLookup);
  }
View Full Code Here


 
  public void testUnmarshallingBigDecimal() throws Exception {
    StringReader reader = new StringReader("<buffalo-call><map><type>java.math.BigDecimal</type>" +
        "<string>value</string>" +
        "<string>123.456</string></map></buffalo-call>");
    StreamReader streamReader = new FastStreamReader(reader);
    unmarshallingContext = new DefaultUnmarshallingContext(new DefaultConverterLookup(), streamReader);
    BigDecimal number = (BigDecimal) unmarshallingContext.convertAnother();
    assertEquals(new BigDecimal("123.456"), number);
  }
View Full Code Here

 
  public void testUnmarshallingBigInteger() throws Exception {
    StringReader reader = new StringReader("<buffalo-call><map><type>java.math.BigInteger</type>" +
        "<string>value</string>" +
        "<string>123</string></map></buffalo-call>");
    StreamReader streamReader = new FastStreamReader(reader);
    unmarshallingContext = new DefaultUnmarshallingContext(new DefaultConverterLookup(), streamReader);
    BigInteger number = (BigInteger) unmarshallingContext.convertAnother();
    assertEquals(new BigInteger("123"), number);
  }
View Full Code Here


public class TestUtils {

  public static StreamReader createStreamReader(String sourcee) {
    return new FastStreamReader(new StringReader(sourcee));
  }
View Full Code Here

TOP

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

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.