Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

exp in ObjectInputStream  RSS feed

 
Chris Chua
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to all, can somebody pls explain to me the importance of ObjectInput and ObjectOutputStreams, i mean what is the real purpose of it I know it is mainly used for writing and reading Objects but for what purpose and advantages of using it.
Thanks
Chris
 
bill bozeman
Ranch Hand
Posts: 1070
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are times when you want to write out an object so that you can preserve it's current state. For an example, suppose you had a long application process and you had a class that stores all of the data the user is entering. Then when they are complete, you enter it into a database. Well if a user was to stop in the middle and they wanted to pick it back up later, you could store the object so when the come back, you can bring it back in and have them finish.
This is a pretty contrived example, but you get my point.
Bill
 
Chris Chua
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bill for the explanation
Chris
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!