code: public void writeMessageSetExtension(final int fieldNumber,
                                         final MessageLite value)
                                         throws IOException {
      writeTag(WireFormat.MESSAGE_SET_ITEM, WireFormat.WIRETYPE_START_GROUP);
      writeUInt32(WireFormat.MESSAGE_SET_TYPE_ID, fieldNumber);
      writeMessage(WireFormat.MESSAGE_SET_MESSAGE, value);
      writeTag(WireFormat.MESSAGE_SET_ITEM, WireFormat.WIRETYPE_END_GROUP);
    }
docs: Write a MessageSet extension field to the stream.  For historical reasons,
  the wire format differs from normal fields.