Serialization
Object serialization
is the process of saving an object's state to a sequence of bytes, as well as the process of rebuilding those bytes into a live object at some future time. The Java Serialization API provides a standard mechanism for developers to handle object serialization.
An object is marked serializable by implementing the java.io.Serializable
interface, which signifies to the underlying API that the object can be flattened into bytes and subsequently inflated in the future.
You could use the default protocol as is, or customize it, or even write your own protocol to perform serialization.
References
- Oracle | Discover the secrets of the Java Serialization API
- Sourced from here | InfoWorld
Additional Reads
- Oracle | Java Object Serialization Specification: Contents
- Oracle | Java Object Serialization Specification: 1 - System Architecture
- Oracle | Java Object Serialization Specification: 2 - Object Output Classes
- Oracle | Java Object Serialization Specification: 3 - Object Input Classes
- Oracle | Java Object Serialization Specification: 4 - Class Descriptors
- Oracle | Java Object Serialization Specification: 5 - Versioning of Serializable Objects
- Oracle | Java Object Serialization Specification: 6 - Object Serialization Stream Protocol
- Oracle | Serialization Filtering
- Oracle | Object Serialization: Frequently Asked Questions
- InfoWorld | The Java serialization algorithm revealed
- InfoWorld | Intro to MicroStream: Super-fast serialization in Java
- InfoWorld | JavaOne 2011: Serialization: Tips, Tricks, and Techniques
- InfoWorld | Signed and sealed objects deliver secure serialized content
- Oracle | JDK 18 Documentation
- Oracle | JDK 18 Specs
- Oracle | Java 18 Core Libraries Developer Guide