Assuming you cannot change the class its implementation, and if you have access to the object's contents from the outside and are able to reconstruct it based on those contents, you could make a helper class that serializes and deserializes the object for you.
This helper class would be serializable, and upon restoring it you would call one of its methods to "reconstruct" the object that you want.
If your class is serializable (in that it implements the Serializable interface, and has a public constructor), yet it contains within it other objects that are not serializable - then you cannot serialize that object.
No. To send objects over the network, you must serialize them into byte code (with perhaps the exception of transforming beans into xml representation - but this wouldn't work in your case).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.