Package com.alibaba.com.caucho.hessian.io

Examples of com.alibaba.com.caucho.hessian.io.Hessian2Output


    CompactedObjectOutputStream oos = new CompactedObjectOutputStream(os);
    oos.writeObject(data);
    System.out.println("compacted java:"+Bytes.bytes2hex(os.toByteArray())+":"+os.size());

    os = new ByteArrayOutputStream();
    Hessian2Output h2o = new Hessian2Output(os);
    h2o.writeObject(data);
    h2o.flushBuffer();
    System.out.println("hessian:"+Bytes.bytes2hex(os.toByteArray())+":"+os.size());

    os = new ByteArrayOutputStream();
    Builder<long[]> lb = Builder.register(long[].class);
    lb.writeTo(data, os);
View Full Code Here


    int len = 0;
    long now = System.currentTimeMillis();
    for(int i=0;i<500;i++)
    {
      ByteArrayOutputStream os = new ByteArrayOutputStream();
      Hessian2Output out = new Hessian2Output(os);
      out.writeObject(bean);
      out.flushBuffer();
      os.close();
      if( i == 0 )
        len = os.toByteArray().length;
      ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray());
      Hessian2Input in = new Hessian2Input(is);
View Full Code Here

{
  private final Hessian2Output mH2o;

  public Hessian2ObjectOutput(OutputStream os)
  {
    mH2o = new Hessian2Output(os);
    mH2o.setSerializerFactory(Hessian2SerializerFactory.SERIALIZER_FACTORY);
  }
View Full Code Here

TOP

Related Classes of com.alibaba.com.caucho.hessian.io.Hessian2Output

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.