Here you can find the source of deserialize(byte[] in)
public static Object deserialize(byte[] in)
//package com.java2s; /**//ww w.j a v a2 s .co m * (C) 2007-2010 Taobao Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * */ import java.io.ByteArrayInputStream; import java.io.ObjectInputStream; public class Main { public static Object deserialize(byte[] in) { Object rv = null; try { if (in != null) { ByteArrayInputStream bis = new ByteArrayInputStream(in); ObjectInputStream is = new ObjectInputStream(bis); rv = is.readObject(); is.close(); bis.close(); } } catch (Exception e) { throw new RuntimeException("deserialize failed", e); } return rv; } }