try
{
ByteArrayInputStream dataIn = new ByteArrayInputStream(data.getBytes());
ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
Base64Decoder dec = new Base64Decoder(dataIn, bytesOut);
dec.process();
ByteArrayInputStream bytesIn = new ByteArrayInputStream(bytesOut.toByteArray());
ObjectInputStream objectIn = new ObjectInputStream(bytesIn);
return objectIn.readObject();
}