Here you can find the source of deserializeObjectFromByteArray(byte[] theSerializedVersion)
public static Object deserializeObjectFromByteArray(byte[] theSerializedVersion) 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 { /**/* w w w .j ava2 s . c o m*/ * Deserialize the object that was serialized into the given byte-array. * @see http://www.velocityreviews.com/forums/t561666-how-to-serialize-a-object-to-a-string-or-byte.html */ public static Object deserializeObjectFromByteArray(byte[] theSerializedVersion) throws IOException, ClassNotFoundException { final ByteArrayInputStream bais = new ByteArrayInputStream(theSerializedVersion); final ObjectInputStream input = new ObjectInputStream(bais); return input.readObject(); } }