Serialization and deserialization of Java objects; tell us something about serialization & deserialization
When two processes for remote communication, each other can send various types of data, such as text, pictures, voice and video, regardless of any type, will eventually be in the form of binary sequences on the network transmission; so that's the problem. can a Java object be sent to another process between two processes? The answer must be yes, if we need to convert the Java object to a sequence of bytes before sending it, then the receiver will return the byte sequence to the Java object. So converting this Java object to a sequence of bytes is called serialization , and the byte sequence is reverted to a Java object called deserialization.
Note: Only objects with classes that implement the serializable or Externalizable interface can be serialized, otherwise ObjectOutputStream's WriteObject (Object obj) method throws IOException
The next article gives you a code to understand serialization & deserialization (asleep?? Good night!! )
Summary of serialization and deserialization of Java objects