Package ch.autumo.commons.cache
Class ContentType
java.lang.Object
ch.autumo.commons.cache.ContentType
Class to handle HTML content types headers and their encodings.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet boundary.Get content type.Get content type header.Get encoding.booleanIs multipart?tryUTF8()Create an UTF8 content type if this encoding is not set, otherwise this content type is returned.
-
Field Details
-
MULTIPART_FORM_DATA_HEADER
Multipart form data header string.- See Also:
-
-
Constructor Details
-
ContentType
Create a content type.- Parameters:
contentTypeHeader- Content type header
-
-
Method Details
-
getContentTypeHeader
Get content type header.- Returns:
- content type header
-
getContentType
Get content type.- Returns:
- content type
-
getEncoding
Get encoding.- Returns:
- encoding
-
getBoundary
Get boundary.- Returns:
- boundary
-
isMultipart
public boolean isMultipart()Is multipart?- Returns:
- true if so
-
tryUTF8
Create an UTF8 content type if this encoding is not set, otherwise this content type is returned.- Returns:
- UTF8 content type if this encoding is not set
-