A
andrewzzz
I am working on a java project and I have to serialize a class (created
by me) which has many references to other classes that should be
serialized too.
I add the marker "implements serializable" to all the necessary
classes, but when I run I get a non serializable exception.
Maybe one ore more objects are non serializable, but how do I identify
them?
I've read that If I have to serialize non serializable objects, I need
to write my own writeObject(ObjectOutputStream out)throws IOException
and readObject(ObjectInputStream in) , but I don't know how to
implement and us them.
note : I can't use transient beacuse I need everything to be
serialized!
Thanks a lot. Bye!
by me) which has many references to other classes that should be
serialized too.
I add the marker "implements serializable" to all the necessary
classes, but when I run I get a non serializable exception.
Maybe one ore more objects are non serializable, but how do I identify
them?
I've read that If I have to serialize non serializable objects, I need
to write my own writeObject(ObjectOutputStream out)throws IOException
and readObject(ObjectInputStream in) , but I don't know how to
implement and us them.
note : I can't use transient beacuse I need everything to be
serialized!
Thanks a lot. Bye!