Here you can find the source of deserialize(byte[] bytes)
public static <T> T deserialize(byte[] bytes) throws IOException, ClassNotFoundException
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { public static <T> T deserialize(byte[] bytes) throws IOException, ClassNotFoundException { try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes))) { return (T) in.readObject(); }/*from ww w . j a v a 2 s. co m*/ } }