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