This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes serializable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "serializable" Watch "serializable" New topic


Rebecca Witmer
Ranch Hand

Joined: Sep 10, 2004
Posts: 46
I have written a class to integrate with someone else's code. I want the Vector it returns to be written out to a file so that she and I can get at the data. She's done that with a Vector in her code but I can't find where in the code she did it. It's a very large spaghetti-like project. Can someone tell me the story of serializable? How does that work? What is it supposed to be used to do? Is it really meant for writing stuff to files, then getting the data back again? Where can I find a good example?

SCJP 1.4
Jeff Bosch
Ranch Hand

Joined: Jul 30, 2003
Posts: 804
Here's the Sun Java Tutorial on Serializing Objects. It has all you're looking for.

Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
It is sorta covered in the JavaRanch Style Guide.
subject: serializable
Similar Threads
Using ObjectOutputStream....but want to switch
Generic Ques
where can i find a good manual on VECTOR except on the API??
Help building a list from a JDBC query