Java tutorial
//package com.java2s; import android.util.Base64; import java.io.ByteArrayInputStream; import java.io.ObjectInputStream; public class Main { public static Object StringToObject(String str) throws Exception { byte[] data = Base64.decode(str, 0); ObjectInputStream objectInputStream = new ObjectInputStream(new ByteArrayInputStream(data)); Object object = objectInputStream.readObject(); objectInputStream.close(); return object; } }