Typically it is trickier than this and you don't provide enough info to say one way or another, but you could try and extend the class, having that child implement serializable...it
might work but again there are a lot of tricky things which could prevent this from working. The API for Serializable states some of the problems that might be encountered using this technique (
Serializable (Java Platform SE 6)).
Depending upon your needs, Helloworld's advice is spot on - there are 3rd party libraries you can use to read and write a class as XML, and one can accomplish a similar thing using Reflection, or you could hack something together as well...depending upon the requirements I've personally found these techniques (converting an object to a basic text file) much more robust, backwards compatible, and much more amenable to data sharing between applications in the basic context of saving application data (there are certain contexts like enterprise applications where serialization is essential)...ymmv