Posts

Showing posts with the label searializable java object

Serialization and deserialization in java with examples

Serialization and Deserialization is one of the commonly used concept in java to store object in any other location like, File, DB, Cloud,...etc and vice versa is called as Deserialization. In other words, Java provides a mechanism called Serialization to persist Java object into a file, database, network, process or any other system. Serialization makes object into an ordered or Serialized stream of bytes. That includes the object data as well as object type of data stored. Before moving further in Serialization and Deserialization in java, have a look at Input and Output streams. If you need to make your object as Serialized, the object class should be implemented from Serializable interface. Serializable is one of the interface called as marker interface in java. Marker interface is nothing but an interface which has no methods or fields to implement but it will do some functionality. Serializable interface is part of java.io package in java. ObjectOutputStream and ObjectInputS