## 类的使用
org.springframework.util.MimeType

- 使用MimeType的程序包
  程序包 | 说明
  --- | ---
  org.springframework.core.codec | `Encoder` and `Decoder` abstractions to convert between a reactive stream of bytes and Java objects.
  org.springframework.util | Miscellaneous utility classes, such as String manipulation utilities, a Log4J configurer, and a state holder for paged lists of objects.

- - ### org.springframework.core.codec中MimeType的使用

    返回变量类型为MimeType的类型的org.springframework.core.codec中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `List<MimeType>` | AbstractDecoder.`getDecodableMimeTypes()`
    `List<MimeType>` | Decoder.`getDecodableMimeTypes()` Return the list of MIME types this decoder supports.
    `List<MimeType>` | AbstractEncoder.`getEncodableMimeTypes()`
    `List<MimeType>` | Encoder.`getEncodableMimeTypes()` Return the list of mime types this encoder supports.

    参数类型为MimeType的org.springframework.core.codec中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `boolean` | AbstractDecoder.`canDecode(ResolvableType elementType, MimeType mimeType)`
    `boolean` | ByteArrayDecoder.`canDecode(ResolvableType elementType, MimeType mimeType)`
    `boolean` | ByteBufferDecoder.`canDecode(ResolvableType elementType, MimeType mimeType)`
    `boolean` | DataBufferDecoder.`canDecode(ResolvableType elementType, MimeType mimeType)`
    `boolean` | Decoder.`canDecode(ResolvableType elementType, MimeType mimeType)` Whether the decoder supports the given target element type and the MIME type of the source stream.
    `boolean` | ResourceDecoder.`canDecode(ResolvableType elementType, MimeType mimeType)`
    `boolean` | StringDecoder.`canDecode(ResolvableType elementType, MimeType mimeType)`
    `boolean` | AbstractEncoder.`canEncode(ResolvableType elementType, MimeType mimeType)`
    `boolean` | ByteArrayEncoder.`canEncode(ResolvableType elementType, MimeType mimeType)`
    `boolean` | ByteBufferEncoder.`canEncode(ResolvableType elementType, MimeType mimeType)`
    `boolean` | CharSequenceEncoder.`canEncode(ResolvableType elementType, MimeType mimeType)`
    `boolean` | DataBufferEncoder.`canEncode(ResolvableType elementType, MimeType mimeType)`
    `boolean` | Encoder.`canEncode(ResolvableType elementType, MimeType mimeType)` Whether the encoder supports the given source element type and the MIME type for the output stream.
    `boolean` | ResourceEncoder.`canEncode(ResolvableType elementType, MimeType mimeType)`
    `boolean` | ResourceRegionEncoder.`canEncode(ResolvableType elementType, MimeType mimeType)`
    `reactor.core.publisher.Flux<T>` | AbstractDataBufferDecoder.`decode(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
    `reactor.core.publisher.Flux<DataBuffer>` | DataBufferDecoder.`decode(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
    `reactor.core.publisher.Flux<T>` | Decoder.`decode(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)` Decode a `DataBuffer` input stream into a Flux of `T`.
    `reactor.core.publisher.Flux<Resource>` | ResourceDecoder.`decode(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
    `reactor.core.publisher.Flux<String>` | StringDecoder.`decode(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
    `protected abstract T` | AbstractDataBufferDecoder.`decodeDataBuffer(DataBuffer buffer, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)` How to decode a `DataBuffer` to the target element type.
    `protected byte[]` | ByteArrayDecoder.`decodeDataBuffer(DataBuffer dataBuffer, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
    `protected ByteBuffer` | ByteBufferDecoder.`decodeDataBuffer(DataBuffer dataBuffer, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
    `protected DataBuffer` | DataBufferDecoder.`decodeDataBuffer(DataBuffer buffer, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
    `protected Resource` | ResourceDecoder.`decodeDataBuffer(DataBuffer dataBuffer, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
    `protected String` | StringDecoder.`decodeDataBuffer(DataBuffer dataBuffer, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
    `reactor.core.publisher.Mono<T>` | AbstractDataBufferDecoder.`decodeToMono(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
    `reactor.core.publisher.Mono<T>` | AbstractDecoder.`decodeToMono(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
    `reactor.core.publisher.Mono<T>` | Decoder.`decodeToMono(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)` Decode a `DataBuffer` input stream into a Mono of `T`.
    `reactor.core.publisher.Flux<DataBuffer>` | ByteArrayEncoder.`encode(org.reactivestreams.Publisher<? extends byte[]> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
    `reactor.core.publisher.Flux<DataBuffer>` | ByteBufferEncoder.`encode(org.reactivestreams.Publisher<? extends ByteBuffer> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
    `reactor.core.publisher.Flux<DataBuffer>` | CharSequenceEncoder.`encode(org.reactivestreams.Publisher<? extends CharSequence> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
    `reactor.core.publisher.Flux<DataBuffer>` | DataBufferEncoder.`encode(org.reactivestreams.Publisher<? extends DataBuffer> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
    `reactor.core.publisher.Flux<DataBuffer>` | ResourceRegionEncoder.`encode(org.reactivestreams.Publisher<? extends ResourceRegion> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
    `reactor.core.publisher.Flux<DataBuffer>` | AbstractSingleValueEncoder.`encode(org.reactivestreams.Publisher<? extends T> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
    `reactor.core.publisher.Flux<DataBuffer>` | Encoder.`encode(org.reactivestreams.Publisher<? extends T> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)` Encode a stream of Objects of type `T` into a `DataBuffer` output stream.
    `protected reactor.core.publisher.Flux<DataBuffer>` | ResourceEncoder.`encode(Resource resource, DataBufferFactory dataBufferFactory, ResolvableType type, MimeType mimeType, Map<String,Object> hints)`
    `protected abstract reactor.core.publisher.Flux<DataBuffer>` | AbstractSingleValueEncoder.`encode(T t, DataBufferFactory dataBufferFactory, ResolvableType type, MimeType mimeType, Map<String,Object> hints)` Encode `T` to an output `DataBuffer` stream.
    `default Long` | Encoder.`getContentLength(T t, MimeType mimeType)` 已过时。 this method was added so `EncoderHttpMessageWriter` can set the content-length header. However after further improvements as of 5.0.7, it is no longer needed, and not used.

    参数类型为MimeType的org.springframework.core.codec中的构造器
    构造器和说明
    `AbstractDataBufferDecoder(MimeType... supportedMimeTypes)`
    `AbstractDecoder(MimeType... supportedMimeTypes)`
    `AbstractEncoder(MimeType... supportedMimeTypes)`
    `AbstractSingleValueEncoder(MimeType... supportedMimeTypes)`

  - ### org.springframework.util中MimeType的使用

    类型参数类型为MimeType的org.springframework.util中的类
    限定符和类型 | 类和说明
    --- | ---
    `static class` | `MimeType.SpecificityComparator<T extends MimeType>`

    声明为MimeType的org.springframework.util中的字段
    限定符和类型 | 字段和说明
    --- | ---
    `static MimeType` | MimeTypeUtils.`ALL` Public constant mime type that includes all media ranges (i.e. "*/*").
    `static MimeType` | MimeTypeUtils.`APPLICATION_JSON` Public constant mime type for `application/json`.
    `static MimeType` | MimeTypeUtils.`APPLICATION_OCTET_STREAM` Public constant mime type for `application/octet-stream`.
    `static MimeType` | MimeTypeUtils.`APPLICATION_XML` Public constant mime type for `application/xml`.
    `static MimeType` | MimeTypeUtils.`IMAGE_GIF` Public constant mime type for `image/gif`.
    `static MimeType` | MimeTypeUtils.`IMAGE_JPEG` Public constant mime type for `image/jpeg`.
    `static MimeType` | MimeTypeUtils.`IMAGE_PNG` Public constant mime type for `image/png`.
    `static MimeType` | MimeTypeUtils.`TEXT_HTML` Public constant mime type for `text/html`.
    `static MimeType` | MimeTypeUtils.`TEXT_PLAIN` Public constant mime type for `text/plain`.
    `static MimeType` | MimeTypeUtils.`TEXT_XML` Public constant mime type for `text/xml`.

    类型参数类型为MimeType的org.springframework.util中的字段
    限定符和类型 | 字段和说明
    --- | ---
    `static Comparator<MimeType>` | MimeTypeUtils.`SPECIFICITY_COMPARATOR` Comparator used by `MimeTypeUtils.sortBySpecificity(List)`.

    返回MimeType的org.springframework.util中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `static MimeType` | MimeTypeUtils.`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 (as supported by `ConversionService`.

    返回变量类型为MimeType的类型的org.springframework.util中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `static List<MimeType>` | MimeTypeUtils.`parseMimeTypes(String mimeTypes)` Parse the given, comma-separated string into a list of `MimeType` objects.

    参数类型为MimeType的org.springframework.util中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `int` | MimeType.`compareTo(MimeType other)` Compares this MIME Type to another alphabetically.
    `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.

    类型变量类型为MimeType的org.springframework.util中的方法参数
    限定符和类型 | 方法和说明
    --- | ---
    `static void` | MimeTypeUtils.`sortBySpecificity(List<MimeType> mimeTypes)` Sorts the given list of `MimeType` objects by specificity.
    `static String` | MimeTypeUtils.`toString(Collection<? extends MimeType> mimeTypes)` Return a string representation of the given list of `MimeType` objects.

    参数类型为MimeType的org.springframework.util中的构造器
    构造器和说明
    `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.