public class MimeTypeUtil extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
private static MimeTypePool |
MIME_TYPE_POOL |
| 构造器和说明 |
|---|
MimeTypeUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
getFirstFormat(String mimeType)
Get the first format for a mime type. default is null.
|
static String |
getFirstFormat(String mimeType,
String defaultMimeType)
Get the first format for a mime type.
|
static List<String> |
getFormats(String mimeType)
Get the format for a mime type.
|
static String |
getMimeType(String format)
Get the mime type for a format. default is null.
|
static String |
getMimeType(String format,
String defaultValue)
Get the mime type for a format.
|
static String |
getNonNullMimeType(String format)
Get the mime type for a format. default is application/octet-stream.
|
private static final MimeTypePool MIME_TYPE_POOL
public static String getMimeType(String format, String defaultValue)
format - the formatdefaultValue - the default mime typepublic static String getMimeType(String format)
format - the formatpublic static String getNonNullMimeType(String format)
format - the formatpublic static List<String> getFormats(String mimeType)
mimeType - the mime typepublic static String getFirstFormat(String mimeType, String defaultMimeType)
mimeType - the mime typedefaultMimeType - the default mime typeCopyright © 2023. All rights reserved.