public static Object bytesToObject ( byte [ ] bytes ) throws IOException , ClassNotFoundException { ByteArrayInputStream bais = new ByteArrayInputStream ( bytes ) ; ObjectInputStream is = new ObjectInputStream ( bais ) ; return is . readObject ( ) ; }
Converts a byte array to a serializable object .