hessian2序列化

ByteArrayOutputStream os = new ByteArrayOutputStream();

Hessian2Output ho = new Hessian2Output(os);

ho.writeObject(m);

ho.getBytesOutputStream().flush();

ho.completeMessage(); 

ho.close();

byte[] bs =  os.toByteArray();

System.out.println(bs.length);

你可能感兴趣的:(hessian2序列化)