code: public static <K, V, T extends Map<K, V>> void marshallMap(T map, ObjectOutput out) throws IOException {
        final int mapSize = map == null ? NULL_VALUE : map.size();
        marshallSize(out, mapSize);
        if (mapSize <= 0) return;
  
        for (Map.Entry<K, V> me : map.entrySet()) {
           out.writeObject(me.getKey());
           out.writeObject(me.getValue());
        }
     }
docs: Marshall the {@code map} to the {@code ObjectOutput}.
  <p>
  {@code null} maps are supported.
  
  @param map {@link Map} to marshall.
  @param out {@link ObjectOutput} to write. It must be non-null.
  @param <K> Key type of the map.
  @param <V> Value type of the map.
  @param <T> Type of the {@link Map}.
  @throws IOException If any of the usual Input/Output related exceptions occur.