Package com.alibaba.dubbo.common.serialize.support.java

Examples of com.alibaba.dubbo.common.serialize.support.java.CompactedObjectOutputStream.writeObject()


    jos.writeObject(data);
    System.out.println("java:"+Bytes.bytes2hex(os.toByteArray())+":"+os.size());

    os = new ByteArrayOutputStream();
    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);
View Full Code Here


    long now = System.currentTimeMillis();
    for(int i=0;i<500;i++)
    {
      ByteArrayOutputStream os = new ByteArrayOutputStream();
      CompactedObjectOutputStream out = new CompactedObjectOutputStream(os);
      out.writeObject(bean);
      os.close();
      if( i == 0 )
        len = os.toByteArray().length;
      ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray());
      CompactedObjectInputStream in = new CompactedObjectInputStream(is);
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.