public class ContentTypeUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String[] |
AJAX_XHTML_ALLOWED_CONTENT_TYPES |
static String |
ANY_CONTENT_TYPE |
static String |
APPLICATION_XML_CONTENT_TYPE |
static String |
DEFAULT_CHAR_ENCODING |
static String[] |
HTML_ALLOWED_CONTENT_TYPES |
static String |
HTML_CONTENT_TYPE |
static String |
TEXT_ANY_CONTENT_TYPE |
static String |
TEXT_XML_CONTENT_TYPE |
static String[] |
XHTML_ALLOWED_CONTENT_TYPES |
static String |
XHTML_CONTENT_TYPE |
Constructor and Description |
---|
ContentTypeUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
chooseWriterContentType(String contentTypeListString,
String[] htmlContentTypes,
String[] xhtmlContentTypes) |
static boolean |
containsContentType(String contentType,
String[] allowedContentTypes)
Indicate if the passes content type match one of the options passed.
|
static String |
getContentTypeFromAcceptHeader(FacesContext context) |
static String[] |
getSupportedContentTypes() |
static boolean |
isXHTMLContentType(String contentType) |
static String[] |
splitContentTypeListString(String contentTypeListString) |
public static final String HTML_CONTENT_TYPE
public static final String TEXT_ANY_CONTENT_TYPE
public static final String ANY_CONTENT_TYPE
public static final String[] HTML_ALLOWED_CONTENT_TYPES
public static final String XHTML_CONTENT_TYPE
public static final String APPLICATION_XML_CONTENT_TYPE
public static final String TEXT_XML_CONTENT_TYPE
public static final String[] XHTML_ALLOWED_CONTENT_TYPES
public static final String[] AJAX_XHTML_ALLOWED_CONTENT_TYPES
public static final String DEFAULT_CHAR_ENCODING
public static boolean containsContentType(String contentType, String[] allowedContentTypes)
public static String chooseWriterContentType(String contentTypeListString, String[] htmlContentTypes, String[] xhtmlContentTypes)
public static String[] splitContentTypeListString(String contentTypeListString)
public static String getContentTypeFromAcceptHeader(FacesContext context)
public static String[] getSupportedContentTypes()
public static boolean isXHTMLContentType(String contentType)
Copyright © 2022 The Apache Software Foundation. All rights reserved.