private static Object fromString(String s) throws IOException, ClassNotFoundException {
  byte[] data=Base64.decode(s,Base64.DEFAULT);
  ObjectInputStream ois=new ObjectInputStream(new ByteArrayInputStream(data));
  Object o=ois.readObject();
  ois.close();
  return o;
}

private static Object fromString ( String s ) throws IOException , ClassNotFoundException { byte [ ] data = Base64 . decode ( s , Base64 . DEFAULT ) ; ObjectInputStream ois = new ObjectInputStream ( new ByteArrayInputStream ( data ) ) ; Object o = ois . readObject ( ) ; ois . close ( ) ; return o ; }
read the object from base64 string .
