Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 1. Advanced Java > Object Serialization

Object Serialization

Serialization is a concept that enables you to store and retrieve objects, as well as to send full-fledged objects "over the wire" to other applications. The reason serialization is of such vital importance to Java should be clear: without it, distributed applications would not be able to send objects to each other. That means that only simple types such as int and char would be allowed in parameter signatures, and complex objects would be limited in what they could do. It's sort of like saying you would have to talk like a 3-year-old whenever you spoke with your boss. You want to have a complex conversation, but you are limited in what you can say.

What Is Serialization?

Without some form of object storage, Java objects can only be transient. There would be no way to maintain a persistent state in an object from one invocation to another. However, serialization can be used for more purposes than maintaining persistence. The RMI system uses object serialization to convert objects to a form that can be sent over a communication mechanism.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint