aspose 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
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: 18570
    
    8

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?