| 程序包 | 说明 |
|---|---|
| com.jn.langx.util.mime |
| 限定符和类型 | 类和说明 |
|---|---|
static class |
MimeType.SpecificityComparator<T extends MimeType>
Comparator to sort
MimeTypes in order of specificity. |
| 限定符和类型 | 字段和说明 |
|---|---|
static MimeType |
MimeTypes.ALL
Public constant mime type that includes all media ranges (i.e. "*/*").
|
static MimeType |
MimeTypes.APPLICATION_JSON
Public constant mime type for
application/json. |
static MimeType |
MimeTypes.APPLICATION_OCTET_STREAM
Public constant mime type for
application/octet-stream. |
static MimeType |
MimeTypes.APPLICATION_XML
Public constant mime type for
application/xml. |
static MimeType |
MimeTypes.IMAGE_GIF
Public constant mime type for
image/gif. |
static MimeType |
MimeTypes.IMAGE_JPEG
Public constant mime type for
image/jpeg. |
static MimeType |
MimeTypes.IMAGE_PNG
Public constant mime type for
image/png. |
static MimeType |
MimeTypes.TEXT_HTML
Public constant mime type for
text/html. |
static MimeType |
MimeTypes.TEXT_PLAIN
Public constant mime type for
text/plain. |
static MimeType |
MimeTypes.TEXT_XML
Public constant mime type for
text/xml. |
| 限定符和类型 | 字段和说明 |
|---|---|
static Comparator<MimeType> |
MimeTypes.SPECIFICITY_COMPARATOR
Comparator used by
MimeTypes.sortBySpecificity(List). |
| 限定符和类型 | 方法和说明 |
|---|---|
static MimeType |
MimeTypes.parseMimeType(String mimeType)
Parse the given String into a single
MimeType. |
static MimeType |
MimeType.valueOf(String value)
Parse the given String value into a
MimeType object,
with this method name following the 'valueOf' naming convention |
| 限定符和类型 | 方法和说明 |
|---|---|
static List<MimeType> |
MimeTypes.parseMimeTypes(String mimeTypes)
Parse the comma-separated string into a list of
MimeType objects. |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
MimeType.compareTo(MimeType other)
Compares this MIME Type to another alphabetically.
|
boolean |
MimeType.equalsTypeAndSubtype(MimeType other)
Similar to
equals(Object) but based on the type and subtype
only, i.e. ignoring parameters. |
boolean |
MimeType.includes(MimeType other)
Indicate whether this MIME Type includes the given MIME Type.
|
boolean |
MimeType.isCompatibleWith(MimeType other)
Indicate whether this MIME Type is compatible with the given MIME Type.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
MimeType.isPresentIn(Collection<? extends MimeType> mimeTypes)
Unlike
Collection.contains(Object) which relies on
equals(Object), this method only checks the type and the
subtype, but otherwise ignores parameters. |
static void |
MimeTypes.sortBySpecificity(List<MimeType> mimeTypes)
Sorts the given list of
MimeType objects by specificity. |
static String |
MimeTypes.toString(Collection<? extends MimeType> mimeTypes)
Return a string representation of the given list of
MimeType objects. |
| 构造器和说明 |
|---|
MimeType(MimeType other,
Charset charset)
Copy-constructor that copies the type, subtype, parameters of the given
MimeType,
and allows to set the specified character set. |
MimeType(MimeType other,
Map<String,String> parameters)
Copy-constructor that copies the type and subtype of the given
MimeType,
and allows for different parameter. |
Copyright © 2020. All rights reserved.