To be honest, I have no idea. This page says this about it:
Notice that both methods are (and must be) declared private, proving that neither method is inherited and overridden or overloaded. The trick here is that the virtual machine will automatically check to see if either method is declared during the corresponding method call. The virtual machine can call private methods of your class whenever it wants but no other objects can. Thus, the integrity of the class is maintained and the serialization protocol can continue to work as normal. The serialization protocol is always used the same way, by calling either ObjectOutputStream.writeObject() or ObjectInputStream.readObject(). So, even though those specialized private methods are provided, the object serialization works the same way as far as any calling object is concerned.
When object are serialized using an ObjectOutputStream, there are more bytes written than just the objects themselves. There is some overhead, definitely at the start and probably also at the end. By closing the ObjectOutputStream you make sure that the overhead at the end is also written.
The byte is where the serialized objects are stored. Not in a File, because I didn't use a FileOutputStream / FileInputStream pair, but in memory as a byte. I could write the same in almost the same way using a file: