/**
* @param original
* @return
*/
public T serializeAndDeserialize(T original)
{
java.io.ByteArrayOutputStream out = new DebuggingByteArrayOutputStream(4096);
XMLEncoder encoder = new XMLEncoder(out);
encoder.writeObject(original);
encoder.close();
dumpByteArray(out.toByteArray());
java.io.ByteArrayInputStream in = new java.io.ByteArrayInputStream(out.toByteArray());
XMLDecoder decoder = new XMLDecoder(in);
T deserialized = (T)decoder.readObject();
decoder.close();
return deserialized;
}
SerializationDeserialization.java 文件源码
java
阅读 17
收藏 0
点赞 0
评论 0
项目:Telepathology
作者:
评论列表
文章目录