日期:2014-05-20  浏览次数:20735 次

java 日期反序列化
请求高手帮忙我现在得到的是一串已经序列化的日期字符串“\/Date(1329101874671)\/” 如何反序列化转换成Date呢?
请各位大虾帮小弟个忙!
------解决方案--------------------
public static Object unserialize(byte[] buf) throws IOExceptionClassNotFoundException{
ObjectInputStream in=new ObjectInputStream(new ByteArrayInputStream(buf));
Object obj=in.readObject();
in.close();
return obj;
}
自己写的反序列化代码;