Here you can find the source of deserialize(byte[] bytes)
public static Object deserialize(byte[] bytes) throws ClassNotFoundException, IOException
//package com.java2s; //License from project: Apache License import java.io.*; public class Main { public static Object deserialize(byte[] bytes) throws ClassNotFoundException, IOException { ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream in = null; try {//from ww w .j ava 2s . c o m // stream closed in the finally in = new ObjectInputStream(bais); return in.readObject(); } finally { if (in != null) { in.close(); } } } }