* @param headerValue
* The "Content-type" header to parse.
*/
public ContentType(String headerValue) {
try {
PreferenceReader pr = new PreferenceReader(
PreferenceReader.TYPE_MEDIA_TYPE, headerValue);
Preference pref;
pref = pr.readPreference();
this.mediaType = (MediaType) pref.getMetadata();
String charSet = this.mediaType.getParameters().getFirstValue(
"charset");
if (charSet != null) {