Package com.nimbusds.oauth2.sdk.util
Class ContentTypeUtils
- java.lang.Object
-
- com.nimbusds.oauth2.sdk.util.ContentTypeUtils
-
public final class ContentTypeUtils extends Object
Content type matching.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidensureContentType(com.nimbusds.common.contenttype.ContentType expected, com.nimbusds.common.contenttype.ContentType found)Ensures the content type of an HTTP header matches an expected value.static voidensureContentType(javax.mail.internet.ContentType expected, javax.mail.internet.ContentType found)Deprecated.
-
-
-
Method Detail
-
ensureContentType
public static void ensureContentType(com.nimbusds.common.contenttype.ContentType expected, com.nimbusds.common.contenttype.ContentType found) throws ParseException
Ensures the content type of an HTTP header matches an expected value. Note that this method compares only the primary type and subtype; any content type parameters, such ascharset, are ignored.- Parameters:
expected- The expected content type. Must not benull.found- The found content type. May benull.- Throws:
ParseException- If the found content type isnullor it primary and subtype and doesn't match the expected.
-
ensureContentType
@Deprecated public static void ensureContentType(javax.mail.internet.ContentType expected, javax.mail.internet.ContentType found) throws ParseException
Deprecated.- Throws:
ParseException- See Also:
ensureContentType(ContentType, ContentType)
-
-