Serialization is the process of writing complete state of java object into output stream, that stream can be file or byte array or stream associated with TCP/IP socket.
Uses of Serialization
- To persist data for future use.
- To send data to a remote computer using such client / server Java technologies as RMI or socket programming.
- To "flatten" an object into array of bytes in memory.
- To exchange data between applets and servlets.
- To store user session in Web applications .
- To activate / passivate EJBs.
- To send objects between the servers in a cluster.
Serializable is a tagging/marker/null interface; it prescribes no methods.
It serves to assign the Serializable data type to the tagged class and to identify the class as one which the developer has designed for persistence.
ObjectOutputStream serializes only those objects which implement this interface.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.