dcsimg
writeObject and readObject methods signatures
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ibha_Sowanni
Posted On:   Tuesday, March 29, 2005 05:33 AM


It is written in documentation that if writeObject and readObject methods are there they must have the following exact signatures



			
private void writeObject(java.io.ObjectOutputStream out) throws IOException
private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException;




If the Serializable interface is empty then how and where are the signatures of these methods checked?

Re: writeObject and readObject methods signatures

Posted By:   Christopher_Koenigsberg  
Posted On:   Thursday, March 31, 2005 08:56 PM

If the Serializable interface is empty then how and where are the signatures of these methods checked?


I think it means that if and when the class in question gets serialized by another class, the JVM will try and call those exact method signatures, perhaps through reflection?

About | Sitemap | Contact