* @param encoding The value of the charset parameter of the content type if it is not already present.
* @return The content type containing a charset parameter, e.g. text/html;charset=utf-8
*/
private String generateFullContentType(String contentType, String encoding)
{
ContentType contentTypeObject = new ContentType(contentType);
if (contentTypeObject.getParameter("charset") == null)
contentTypeObject.setParameter("charset", encoding);
return contentTypeObject.unparse();
}