java.io.NotSerializableException

Hi, im getting this error…

Exception: java.io.NotSerializableException:

…when i try to use the “writeObject(obj)” method. As far as i can make out from what ive read on the net, i need to do soemthing to do with Serialization for the readObject() and writeObject methods but im not sure what.
Anyone able to clear this up? Thanks

your class must implement the java.io.Serializable interface.

does all of the classes members also need to implement serializable

no, i dont need serializable at all for any other reason than to get the readObject and writeObject methods to work. The worked fine until i implemented threads to deal with the client and server seperatly.
Ive tried make the entire class implement the serializable interface but i still get the same error.
Any other ideas?

i think the problem is the fact that im using the readObject() and writeObject() methods when i dont need to. I was trying to use them to send data (a Sprite object) but im starting to think thats not what they are for.
What methods can i use to send an object as a packet between the client and server?