public abstract class MimeType
extends java.lang.Object
Constants and functions for representing and parsing MIME content types.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TEXT_HTML
Constant for the "text/html" MIME type with "UTF-8" encoding.
|
static java.lang.String |
TEXT_PLAIN
Constant for the "text/plain" MIME type with "UTF-8" encoding.
|
Constructor and Description |
---|
MimeType() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getParameter(java.lang.String type,
java.lang.String name)
Parse MIME content type to obtain an optional parameter value.
|
public static final java.lang.String TEXT_HTML
Constant for the "text/html" MIME type with "UTF-8" encoding.
public static final java.lang.String TEXT_PLAIN
Constant for the "text/plain" MIME type with "UTF-8" encoding.
public static java.lang.String getParameter(java.lang.String type, java.lang.String name)
Parse MIME content type to obtain an optional parameter value. For example, parsing type="multipart/mixed;boundary=ABC" with name="boundary" would return "ABC". Parameter names are case-insensitive, values are case-sensitive.
type
- MIME content type.name
- Parameter name.null
if the parameter is not found.