The toString() method on the MIMEType object returns the serialized MIME.
toString()
MIMEType
Because of the need for standard compliance, this method does not allow users to customize the serialization process of the MIME.