com.nimbusds.oauth2.sdk.util
Class ContentTypeUtils

java.lang.Object
  extended by com.nimbusds.oauth2.sdk.util.ContentTypeUtils

public class ContentTypeUtils
extends Object

Content type matching.

Author:
Vladimir Dzhuvinov

Method Summary
static void ensureContentType(javax.mail.internet.ContentType expected, javax.mail.internet.ContentType found)
          Ensures the content type of an HTTP header matches an expected value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

ensureContentType

public static void ensureContentType(javax.mail.internet.ContentType expected,
                                     javax.mail.internet.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 as charset, are ignored.

Parameters:
expected - The expected content type. Must not be null.
found - The found content type. May be null.
Throws:
ParseException - If the found content type is null or it primary and subtype and doesn't match the expected.


Copyright © 2013 NimbusDS. All Rights Reserved.