public class ContentTypeUtil extends Object
| Constructor and Description |
|---|
ContentTypeUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
bestContentType(String acceptHeader,
Collection<String> availableTypeNames)
Given an Accept header value and a list of available type names, decide
which type is the best fit.
|
static Set<edu.cornell.mannlib.vitro.webapp.utils.http.ContentTypeUtil.AcceptableType> |
parseAcceptHeader(String acceptHeader)
The order of items in the Accept header is not important.
|
public static String bestContentType(String acceptHeader, Collection<String> availableTypeNames) throws AcceptHeaderParsingException, NotAcceptableException
public static Set<edu.cornell.mannlib.vitro.webapp.utils.http.ContentTypeUtil.AcceptableType> parseAcceptHeader(String acceptHeader) throws AcceptHeaderParsingException
AcceptHeaderParsingExceptionCopyright © 2016. All rights reserved.