File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes How to find if the class is serializable? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Java » Java in General
Bookmark "How to find if the class is serializable?" Watch "How to find if the class is serializable?" New topic
Author

How to find if the class is serializable?

Sharmistha Sarkar
Ranch Hand

Joined: Dec 18, 2012
Posts: 44
I have serialized a class.How could I be sure or test whether the class has been serialized correctly or not with the proper value?


I have gone through a site http://www.ibm.com/developerworks/library/j-serialtest/index.html , but specify code snippet under "Listing 1. Is the class serializable?" section; I could not establish it properly with my example.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 19319
    
  10

Listing 1 is useless to you because you already know the class is serializable. (You declared it that way in line 3 of your posted code.)

Now have a look at listing 2, which closely resembles the code you already have.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to find if the class is serializable?