Here you can find the source of deserialize(byte[] b)
public static Object deserialize(byte[] b) throws IOException, ClassNotFoundException
//package com.java2s; //License from project: Open Source License import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.ObjectInputStream; public class Main { public static Object deserialize(byte[] b) throws IOException, ClassNotFoundException { Object obj = null;/*from w ww. jav a2s . co m*/ ObjectInputStream oin = null; try { //System.out.println("read obj: " + b.length); ByteArrayInputStream bin = new ByteArrayInputStream(b); oin = new ObjectInputStream(bin); obj = oin.readObject(); return obj; } finally { if (oin != null) oin.close(); } } }