Object serialization saves object data in a particular file format. Of course, you can use the
writeObject/readObject methods without having to know the exact sequence of bytes that represents objects in a file. Nonetheless, we found studying the data format extremely helpful for gaining insight into the object streaming process. As the details are somewhat technical, feel free to skip this section if you are not interested in the implementation.
Every file begins with the two-byte “magic number”
followed by the version number of the object serialization format, which is currently
(We use hexadecimal numbers throughout this section to denote bytes.) Then, it contains a sequence ...