code: static <K, V> void populateMap(Map<K, V> map, ObjectInputStream stream)
        throws IOException, ClassNotFoundException {
      int size = stream.readInt();
      populateMap(map, stream, size);
    }
docs: Populates a map by reading an input stream, as part of deserialization. See {@link #writeMap}
  for the data format.