An ObjectInputStream can be used to load Java objects from a stream where the
objects were saved using an ObjectOutputStream. Primitive data (ints, bytes,
chars, etc) can also be loaded if the data was saved as primitive types as
well. It is invalid to attempt to read an object as primitive data.