• Post Reply Bookmark Topic Watch Topic
  • New Topic

serialize multiple java classes in single file  RSS feed

 
Mahendran Aiyappan
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I wants to serialize/deserialize multiple java classes into a single file. Is it possible to do that?

Thanks,
Mahendran
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am going to guess that what you wanted to say was "serialize objects from multiple java classes" since serialize classes makes no sense.

IF all of the classes are serializable, you can put the references in a collection such as an ArrayList and serialize that in a single call.

This works amazingly quickly and simply.

Bill
 
Mahendran Aiyappan
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William,

Thanks for your quick reply. Yes my question is "serialize objects from multiple java classes" only.

And thanks for your solution.

Mahendran
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!