• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

need for serialization

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
why do we serialize objects in java .if there is any article regarding this please provide link thank you
 
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If anybody knows of a website, please tell Rai Talari. There are bound to be lots, but I can't think of many at the moment.
I can think of two major reasons for serializing objects:

  • Storage. You can convert an object to a "series" of bytes, which are stored in a file (you can put any extension you like on it, but some people like .dat, .obj etc). Not only can you serialize the object, but you can also retrieve it. You will, however, find in many classes in Swing, for example, that serialization is only suitable for short-term storage of objects of those classes.
  • Transmission. When you have an object in its serial form, you can send it across a network from server to server, application to application, or country to country. Most objects sent back and forth in RMI for example, are in their serial form.

  • There is an article about RMI in the Java tutorial here. The "implementing" page tells us that objects are usually passed in Serializable form.
    I have found a page also in the Java tutorial, about Serialization.

    I hope this is of use to you.

    Anybody else reading, please join in and help.

    CR
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    reply
      Bookmark Topic Watch Topic
    • New Topic