How can I serialize an object that does not implement Serializable? I cannot mark it Serializable because the class is from a 3rd party library.
If the class is not final, you can make your own class that extends it and implements Serializable. There are lots of other ways to serialize besides Java's built-in mechanism though.