code: public void writeAsMessageSetTo(final CodedOutputStream output)
        throws IOException {
      for (final Map.Entry<Integer, Field> entry : fields.entrySet()) {
        entry.getValue().writeAsMessageSetExtensionTo(
          entry.getKey(), output);
      }
    }
docs: Serializes the set and writes it to {@code output} using
  {@code MessageSet} wire format.