Here you can find the source of deserialize(byte[] bytes)
public static Object deserialize(byte[] bytes)
//package com.java2s; //License from project: Apache License import java.io.*; public class Main { public static Object deserialize(byte[] bytes) { if (bytes == null) { return null; }/*from ww w . jav a 2 s. c o m*/ ByteArrayInputStream b = new ByteArrayInputStream(bytes); ObjectInputStream o; try { o = new ObjectInputStream(b); return o.readObject(); } catch (IOException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); } return null; } }