# Uses of Class
org.springframework.util.MimeType

Packages that use MimeType
Package
Description
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 utilities for working with strings, classes, collections, reflection, etc.

## Uses of MimeType in org.springframework.core.codec

Methods in org.springframework.core.codec that return types with arguments of type MimeType
Modifier and Type
Method
Description
`List<MimeType>`
AbstractDecoder.`getDecodableMimeTypes()`
`List<MimeType>`
Decoder.`getDecodableMimeTypes()`
Return the list of MIME types supported by this Decoder.
`default List<MimeType>`
Decoder.`getDecodableMimeTypes(ResolvableType targetType)`
Return the list of MIME types supported by this Decoder for the given type of element.
`List<MimeType>`
AbstractEncoder.`getEncodableMimeTypes()`
`List<MimeType>`
Encoder.`getEncodableMimeTypes()`
Return the list of MIME types supported by this Encoder.
`default List<MimeType>`
Encoder.`getEncodableMimeTypes(ResolvableType elementType)`
Return the list of MIME types supported by this Encoder for the given type of element.
Methods in org.springframework.core.codec with parameters of type MimeType
Modifier and Type
Method
Description
`boolean`
AbstractDecoder.`canDecode(ResolvableType elementType, MimeType mimeType)`
`boolean`
ByteArrayDecoder.`canDecode(ResolvableType elementType, MimeType mimeType)`
`boolean`
ByteBufferDecoder.`canDecode(ResolvableType elementType, MimeType mimeType)`
`boolean`
CharBufferDecoder.`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`
Netty5BufferDecoder.`canDecode(ResolvableType elementType, MimeType mimeType)`
Deprecated, for removal: This API element is subject to removal in a future version.
`boolean`
NettyByteBufDecoder.`canDecode(ResolvableType elementType, MimeType mimeType)`
`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`
Netty5BufferEncoder.`canEncode(ResolvableType type, MimeType mimeType)`
Deprecated, for removal: This API element is subject to removal in a future version.
`boolean`
NettyByteBufEncoder.`canEncode(ResolvableType type, MimeType mimeType)`
`boolean`
ResourceEncoder.`canEncode(ResolvableType elementType, MimeType mimeType)`
`boolean`
ResourceRegionEncoder.`canEncode(ResolvableType elementType, MimeType mimeType)`
`final reactor.core.publisher.Flux<T>`
AbstractCharSequenceDecoder.`decode(Publisher<DataBuffer> input, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`final T`
AbstractCharSequenceDecoder.`decode(DataBuffer dataBuffer, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`reactor.core.publisher.Flux<T>`
AbstractDataBufferDecoder.`decode(Publisher<DataBuffer> input, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`byte[]`
ByteArrayDecoder.`decode(DataBuffer dataBuffer, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`ByteBuffer`
ByteBufferDecoder.`decode(DataBuffer dataBuffer, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`reactor.core.publisher.Flux<DataBuffer>`
DataBufferDecoder.`decode(Publisher<DataBuffer> input, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`DataBuffer`
DataBufferDecoder.`decode(DataBuffer buffer, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`reactor.core.publisher.Flux<T>`
Decoder.`decode(Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
Decode a `DataBuffer` input stream into a Flux of `T`.
`default T`
Decoder.`decode(DataBuffer buffer, ResolvableType targetType, MimeType mimeType, Map<String,Object> hints)`
Decode a data buffer to an Object of type T.
`io.netty5.buffer.Buffer`
Netty5BufferDecoder.`decode(DataBuffer dataBuffer, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
Deprecated, for removal: This API element is subject to removal in a future version.
`io.netty.buffer.ByteBuf`
NettyByteBufDecoder.`decode(DataBuffer dataBuffer, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`reactor.core.publisher.Flux<Resource>`
ResourceDecoder.`decode(Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`Resource`
ResourceDecoder.`decode(DataBuffer dataBuffer, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`protected T`
AbstractDataBufferDecoder.`decodeDataBuffer(DataBuffer buffer, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
Deprecated.
as of 5.2, please implement `Decoder.decode(DataBuffer, ResolvableType, MimeType, Map)` instead
`reactor.core.publisher.Mono<T>`
AbstractDataBufferDecoder.`decodeToMono(Publisher<DataBuffer> input, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`reactor.core.publisher.Mono<T>`
AbstractDecoder.`decodeToMono(Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`reactor.core.publisher.Mono<T>`
Decoder.`decodeToMono(Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
Decode a `DataBuffer` input stream into a Mono of `T`.
`final reactor.core.publisher.Flux<DataBuffer>`
AbstractSingleValueEncoder.`encode(Publisher<? extends T> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, 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.
`reactor.core.publisher.Flux<DataBuffer>`
ByteArrayEncoder.`encode(Publisher<? extends byte[]> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`reactor.core.publisher.Flux<DataBuffer>`
ByteBufferEncoder.`encode(Publisher<? extends ByteBuffer> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`reactor.core.publisher.Flux<DataBuffer>`
CharSequenceEncoder.`encode(Publisher<? extends CharSequence> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`reactor.core.publisher.Flux<DataBuffer>`
DataBufferEncoder.`encode(Publisher<? extends DataBuffer> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`reactor.core.publisher.Flux<DataBuffer>`
Encoder.`encode(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.
`reactor.core.publisher.Flux<DataBuffer>`
Netty5BufferEncoder.`encode(Publisher<? extends io.netty5.buffer.Buffer> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
Deprecated, for removal: This API element is subject to removal in a future version.
`reactor.core.publisher.Flux<DataBuffer>`
NettyByteBufEncoder.`encode(Publisher<? extends io.netty.buffer.ByteBuf> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`protected reactor.core.publisher.Flux<DataBuffer>`
ResourceEncoder.`encode(Resource resource, DataBufferFactory bufferFactory, ResolvableType type, MimeType mimeType, Map<String,Object> hints)`
`reactor.core.publisher.Flux<DataBuffer>`
ResourceRegionEncoder.`encode(Publisher<? extends ResourceRegion> input, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
`DataBuffer`
ByteArrayEncoder.`encodeValue(byte[] bytes, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)`
`DataBuffer`
ByteBufferEncoder.`encodeValue(ByteBuffer byteBuffer, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)`
`DataBuffer`
CharSequenceEncoder.`encodeValue(CharSequence charSequence, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)`
`DataBuffer`
DataBufferEncoder.`encodeValue(DataBuffer buffer, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)`
`default DataBuffer`
Encoder.`encodeValue(T value, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)`
Encode an Object of type T to a data buffer.
`DataBuffer`
Netty5BufferEncoder.`encodeValue(io.netty5.buffer.Buffer buffer, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)`
Deprecated, for removal: This API element is subject to removal in a future version.
`DataBuffer`
NettyByteBufEncoder.`encodeValue(io.netty.buffer.ByteBuf byteBuf, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)`
Constructors in org.springframework.core.codec with parameters of type MimeType
Modifier
Constructor
Description
`protected`
`AbstractCharSequenceDecoder(List<String> delimiters, boolean stripDelimiter, MimeType... mimeTypes)`
Create a new `AbstractCharSequenceDecoder` with the given parameters.
`protected`
`AbstractDataBufferDecoder(MimeType... supportedMimeTypes)`
`protected`
`AbstractDecoder(MimeType... supportedMimeTypes)`
`protected`
`AbstractEncoder(MimeType... supportedMimeTypes)`
``
`AbstractSingleValueEncoder(MimeType... supportedMimeTypes)`
``
`CharBufferDecoder(List<String> delimiters, boolean stripDelimiter, MimeType... mimeTypes)`

## Uses of MimeType in org.springframework.util

Classes in org.springframework.util with type parameters of type MimeType
Modifier and Type
Class
Description
`static class`
`MimeType.SpecificityComparator<T extends MimeType>`
Deprecated, for removal: This API element is subject to removal in a future version.
As of 6.0, with no direct replacement
Fields in org.springframework.util declared as MimeType
Modifier and Type
Field
Description
`static final MimeType`
MimeTypeUtils.`ALL`
Public constant mime type that includes all media ranges (i.e.
`static final MimeType`
MimeTypeUtils.`APPLICATION_GRAPHQL`
Public constant mime type for `application/graphql+json`.
`static final MimeType`
MimeTypeUtils.`APPLICATION_JSON`
Public constant mime type for `application/json`.
`static final MimeType`
MimeTypeUtils.`APPLICATION_OCTET_STREAM`
Public constant mime type for `application/octet-stream`.
`static final MimeType`
MimeTypeUtils.`APPLICATION_XML`
Public constant mime type for `application/xml`.
`static final MimeType`
MimeTypeUtils.`IMAGE_GIF`
Public constant mime type for `image/gif`.
`static final MimeType`
MimeTypeUtils.`IMAGE_JPEG`
Public constant mime type for `image/jpeg`.
`static final MimeType`
MimeTypeUtils.`IMAGE_PNG`
Public constant mime type for `image/png`.
`static final MimeType`
MimeTypeUtils.`TEXT_HTML`
Public constant mime type for `text/html`.
`static final MimeType`
MimeTypeUtils.`TEXT_PLAIN`
Public constant mime type for `text/plain`.
`static final MimeType`
MimeTypeUtils.`TEXT_XML`
Public constant mime type for `text/xml`.
Fields in org.springframework.util with type parameters of type MimeType
Modifier and Type
Field
Description
`static final Comparator<MimeType>`
MimeTypeUtils.`SPECIFICITY_COMPARATOR`
Deprecated, for removal: This API element is subject to removal in a future version.
As of 6.0, with no direct replacement
Methods in org.springframework.util with type parameters of type MimeType
Modifier and Type
Method
Description
`static <T extends MimeType>
void`
MimeTypeUtils.`sortBySpecificity(List<T> mimeTypes)`
Sort the given list of `MimeType` objects by specificity.
Methods in org.springframework.util that return MimeType
Modifier and Type
Method
Description
`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`).
Methods in org.springframework.util that return types with arguments of type MimeType
Modifier and Type
Method
Description
`static List<MimeType>`
MimeTypeUtils.`parseMimeTypes(String mimeTypes)`
Parse the comma-separated string into a mutable list of `MimeType` objects.
Methods in org.springframework.util with parameters of type MimeType
Modifier and Type
Method
Description
`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.
`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.`isLessSpecific(MimeType other)`
Indicates whether this `MimeType` is less specific than the given type.
`boolean`
MimeType.`isMoreSpecific(MimeType other)`
Indicates whether this `MimeType` is more specific than the given type.
Method parameters in org.springframework.util with type arguments of type MimeType
Modifier and Type
Method
Description
`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 String`
MimeTypeUtils.`toString(Collection<? extends MimeType> mimeTypes)`
Generate a string representation of the given collection of `MimeType` objects.
Constructors in org.springframework.util with parameters of type MimeType
Modifier
Constructor
Description
`protected`
`MimeType(MimeType other)`
Copy-constructor that copies the type, subtype and parameters of the given `MimeType`, skipping checks performed in other constructors.
``
`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.