Here you can find the source of deserialized(final byte[] data)
@SuppressWarnings("unchecked") public static Object deserialized(final byte[] data) throws IOException, ClassNotFoundException
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { @SuppressWarnings("unchecked") public static Object deserialized(final byte[] data) throws IOException, ClassNotFoundException { if (data == null || data.length == 0) return null; final ByteArrayInputStream bais = new ByteArrayInputStream(data); ObjectInputStream ois = null; try {/*from ww w . j a v a 2 s .co m*/ ois = new ObjectInputStream(bais); return ois.readObject(); } catch (IOException e) { throw e; } catch (ClassNotFoundException e) { throw e; } finally { try { if (ois != null) ois.close(); } catch (IOException e) { // eat it. } } } }