Java deep copy library

前端 未结 5 1380
青春惊慌失措
青春惊慌失措 2020-12-18 08:27

Is there library that can make deep copy?

ex) normal object, array, list, inputstream etc.

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-18 08:51

    Look for serialization. Java supports it out of the box, but you can also try Hessian, Kryo...

    Here's an introduction to Java serialization: http://java.sun.com/developer/technicalArticles/Programming/serialization/

    And here's a benchmark done by the Kryo folks: http://code.google.com/p/thrift-protobuf-compare/wiki/Benchmarking (list of 20 serialization libs)

提交回复
热议问题