Here you can find the source of deserialize(byte[] bytes)
public static Object deserialize(byte[] bytes)
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { public static Object deserialize(byte[] bytes) { if (bytes == null) { return null; }// ww w.j av a 2s .com try { ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bytes)); return ois.readObject(); } catch (IOException ex) { throw new IllegalArgumentException("Failed to deserialize object", ex); } catch (ClassNotFoundException ex) { throw new IllegalStateException("Failed to deserialize object type", ex); } } }