Uses of Class
org.springframework.http.MediaType
Packages that use MediaType
Package
Description
Contains a basic abstraction over client/server-side HTTP.
Contains an abstraction over client-side HTTP.
Provides implementations of
Encoder
and Decoder for web use.JSON encoder and decoder support.
Multipart support.
Provides an encoder and a decoder for
Google Protocol Buffers.
Provides an HttpMessageConverter abstraction to convert between Java objects and HTTP input/output messages.
Provides HttpMessageConverter implementations for handling Atom and RSS feeds.
Provides HttpMessageConverter implementations for handling JSON.
Provides an HttpMessageConverter implementation for handling
Google Protocol Buffers.
Provides HttpMessageConverter implementations for handling XML.
Common, generic interfaces that define minimal boundary points
between Spring's web infrastructure and other framework modules.
This package contains classes used to determine the requested the media types in a request.
Core package of the client-side web support.
Support classes for annotation-based handler method processing.
Core interfaces and classes for Spring's generic, reactive web support.
Support for creating a client proxy for an HTTP service annotated with
HttpExchange methods.-
Uses of MediaType in org.springframework.http
Fields in org.springframework.http declared as MediaTypeModifier and TypeFieldDescriptionstatic final MediaTypeMediaType.ALLMedia type for "*/*", including all media ranges.static final MediaTypeMediaType.APPLICATION_ATOM_XMLMedia type forapplication/atom+xml.static final MediaTypeMediaType.APPLICATION_CBORMedia type forapplication/cbor.static final MediaTypeMediaType.APPLICATION_FORM_URLENCODEDMedia type forapplication/x-www-form-urlencoded.static final MediaTypeMediaType.APPLICATION_GRAPHQL_RESPONSEMedia type forapplication/graphql-response+json.static final MediaTypeMediaType.APPLICATION_JSONMedia type forapplication/json.static final MediaTypeMediaType.APPLICATION_NDJSONMedia type forapplication/x-ndjson.static final MediaTypeMediaType.APPLICATION_OCTET_STREAMMedia type forapplication/octet-stream.static final MediaTypeMediaType.APPLICATION_PDFMedia type forapplication/pdf.static final MediaTypeMediaType.APPLICATION_PROBLEM_JSONMedia type forapplication/problem+json.static final MediaTypeMediaType.APPLICATION_PROBLEM_XMLMedia type forapplication/problem+xml.static final MediaTypeMediaType.APPLICATION_PROTOBUFMedia type forapplication/x-protobuf.static final MediaTypeMediaType.APPLICATION_RSS_XMLMedia type forapplication/rss+xml.static final MediaTypeMediaType.APPLICATION_XHTML_XMLMedia type forapplication/xhtml+xml.static final MediaTypeMediaType.APPLICATION_XMLMedia type forapplication/xml.static final MediaTypeMediaType.APPLICATION_YAMLMedia type forapplication/yaml.static final MediaTypeMediaType.IMAGE_GIFMedia type forimage/gif.static final MediaTypeMediaType.IMAGE_JPEGMedia type forimage/jpeg.static final MediaTypeMediaType.IMAGE_PNGMedia type forimage/png.static final MediaTypeMediaType.MULTIPART_FORM_DATAMedia type formultipart/form-data.static final MediaTypeMediaType.MULTIPART_MIXEDMedia type formultipart/mixed.static final MediaTypeMediaType.MULTIPART_RELATEDMedia type formultipart/related.static final MediaTypeMediaType.TEXT_EVENT_STREAMMedia type fortext/event-stream.static final MediaTypeMediaType.TEXT_HTMLMedia type fortext/html.static final MediaTypeMediaType.TEXT_MARKDOWNMedia type fortext/markdown.static final MediaTypeMediaType.TEXT_PLAINMedia type fortext/plain.static final MediaTypeMediaType.TEXT_XMLMedia type fortext/xml.Methods in org.springframework.http that return MediaTypeModifier and TypeMethodDescriptionstatic MediaTypeMediaType.asMediaType(org.springframework.util.MimeType mimeType) Re-create the given mime type as a media type.MediaType.copyQualityValue(MediaType mediaType) Return a replica of this instance with the quality value of the givenMediaType.HttpHeaders.getContentType()Return the media type of the body, as specified by theContent-Typeheader.static MediaTypeMediaType.parseMediaType(String mediaType) Parse the given String into a singleMediaType.MediaType.removeQualityValue()Return a replica of this instance with its quality value removed.static MediaTypeParse the given String value into aMediaTypeobject, with this method name following the 'valueOf' naming convention (as supported byConversionService).Methods in org.springframework.http that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionMediaType.asMediaTypes(List<org.springframework.util.MimeType> mimeTypes) Re-create the given mime types as media types.HttpHeaders.getAccept()Return the list of acceptable media types, as specified by theAcceptheader.HttpHeaders.getAcceptPatch()Return the list of acceptable media types forPATCHmethods, as specified by theAccept-Patchheader.MediaTypeFactory.getMediaType(@Nullable String filename) Determine a media type for the given file name, if possible.MediaTypeFactory.getMediaType(@Nullable org.springframework.core.io.Resource resource) Determine a media type for the given resource, if possible.MediaTypeFactory.getMediaTypes(@Nullable String filename) Determine the media types for the given file name, if possible.MediaType.parseMediaTypes(@Nullable String mediaTypes) Parse the comma-separated string into a list ofMediaTypeobjects.MediaType.parseMediaTypes(@Nullable List<String> mediaTypes) Parse the given list of (potentially) comma-separated strings into a list ofMediaTypeobjects.Methods in org.springframework.http with parameters of type MediaTypeModifier and TypeMethodDescriptionSet the list of acceptable media types, as specified by theAcceptheader.RequestEntity.BodyBuilder.contentType(MediaType contentType) Set the media type of the body, as specified by theContent-Typeheader.ResponseEntity.BodyBuilder.contentType(MediaType contentType) Set the media type of the body, as specified by theContent-Typeheader.MediaType.copyQualityValue(MediaType mediaType) Return a replica of this instance with the quality value of the givenMediaType.booleanIndicate whether thisMediaTypeincludes the given media type.booleanMediaType.isCompatibleWith(@Nullable MediaType other) Indicate whether thisMediaTypeis compatible with the given media type.voidHttpHeaders.setContentType(@Nullable MediaType mediaType) Set the media type of the body, as specified by theContent-Typeheader.Method parameters in org.springframework.http with type arguments of type MediaTypeModifier and TypeMethodDescriptionvoidSet the list of acceptable media types, as specified by theAcceptheader.voidHttpHeaders.setAcceptPatch(List<MediaType> mediaTypes) static StringMediaType.toString(Collection<MediaType> mediaTypes) Return a string representation of the given list ofMediaTypeobjects.Constructors in org.springframework.http with parameters of type MediaTypeModifierConstructorDescriptionCopy-constructor that copies the type, subtype and parameters of the givenMediaType, and allows to set the specified character set.Copy-constructor that copies the type and subtype of the givenMediaType, and allows for different parameters. -
Uses of MediaType in org.springframework.http.client
Methods in org.springframework.http.client with parameters of type MediaTypeModifier and TypeMethodDescriptionMultipartBodyBuilder.PartBuilder.contentType(MediaType contentType) Set the media type of the part.Variant ofMultipartBodyBuilder.part(String, Object)that also accepts a MediaType. -
Uses of MediaType in org.springframework.http.codec
Methods in org.springframework.http.codec that return MediaTypeModifier and TypeMethodDescriptionDecoderHttpMessageReader.getContentType(HttpMessage inputMessage) Determine the Content-Type of the HTTP message based on the "Content-Type" header or otherwise default toMediaType.APPLICATION_OCTET_STREAM.protected MediaTypeFormHttpMessageWriter.getMediaType(@Nullable MediaType mediaType) Return the content type used to write forms, either the given media type or otherwiseapplication/x-www-form-urlencoded.Methods in org.springframework.http.codec that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionDecoderHttpMessageReader.getReadableMediaTypes()DecoderHttpMessageReader.getReadableMediaTypes(org.springframework.core.ResolvableType elementType) FormHttpMessageReader.getReadableMediaTypes()HttpMessageReader.getReadableMediaTypes()Return the list of media types supported by this reader.HttpMessageReader.getReadableMediaTypes(org.springframework.core.ResolvableType elementType) Return the list of media types supported by this Reader for the given type of element.ServerSentEventHttpMessageReader.getReadableMediaTypes()AbstractJacksonEncoder.getStreamingMediaTypes()HttpMessageEncoder.getStreamingMediaTypes()Return "streaming" media types for which flushing should be performed automatically vs at the end of the input stream.EncoderHttpMessageWriter.getWritableMediaTypes()EncoderHttpMessageWriter.getWritableMediaTypes(org.springframework.core.ResolvableType elementType) FormHttpMessageWriter.getWritableMediaTypes()HttpMessageWriter.getWritableMediaTypes()Return the list of media types supported by this Writer.HttpMessageWriter.getWritableMediaTypes(org.springframework.core.ResolvableType elementType) Return the list of media types supported by this Writer for the given type of element.ResourceHttpMessageWriter.getWritableMediaTypes()ServerSentEventHttpMessageWriter.getWritableMediaTypes()Methods in org.springframework.http.codec with parameters of type MediaTypeModifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void> ResourceHttpMessageWriter.addDefaultHeaders(ReactiveHttpOutputMessage message, org.springframework.core.io.Resource resource, @Nullable MediaType contentType, Map<String, Object> hints) Adds the default headers for the given resource to the given message.booleanDecoderHttpMessageReader.canRead(org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType) booleanFormHttpMessageReader.canRead(org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType) booleanHttpMessageReader.canRead(org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType) Whether the given object type is supported by this reader.booleanServerSentEventHttpMessageReader.canRead(org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType) booleanEncoderHttpMessageWriter.canWrite(org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType) booleanFormHttpMessageWriter.canWrite(org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType) booleanHttpMessageWriter.canWrite(org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType) Whether the given object type is supported by this writer.booleanResourceHttpMessageWriter.canWrite(org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType) booleanServerSentEventHttpMessageWriter.canWrite(org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType) AbstractJacksonEncoder.getEncodeHints(@Nullable org.springframework.core.ResolvableType actualType, org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType, ServerHttpRequest request, ServerHttpResponse response) HttpMessageEncoder.getEncodeHints(org.springframework.core.ResolvableType actualType, org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType, ServerHttpRequest request, ServerHttpResponse response) Get decoding hints based on the server request or annotations on the target controller method parameter.protected MediaTypeFormHttpMessageWriter.getMediaType(@Nullable MediaType mediaType) Return the content type used to write forms, either the given media type or otherwiseapplication/x-www-form-urlencoded.EncoderHttpMessageWriter.getWriteHints(org.springframework.core.ResolvableType streamType, org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType, ServerHttpRequest request, ServerHttpResponse response) Get additional hints for encoding for example based on the server request or annotations from controller method parameters.reactor.core.publisher.Mono<Void> EncoderHttpMessageWriter.write(Publisher<? extends T> inputStream, org.springframework.core.ResolvableType actualType, org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType, ServerHttpRequest request, ServerHttpResponse response, Map<String, Object> hints) reactor.core.publisher.Mono<Void> EncoderHttpMessageWriter.write(Publisher<? extends T> inputStream, org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType, ReactiveHttpOutputMessage message, Map<String, Object> hints) reactor.core.publisher.Mono<Void> FormHttpMessageWriter.write(Publisher<? extends org.springframework.util.MultiValueMap<String, String>> inputStream, org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType, ReactiveHttpOutputMessage message, Map<String, Object> hints) default reactor.core.publisher.Mono<Void> HttpMessageWriter.write(Publisher<? extends T> inputStream, org.springframework.core.ResolvableType actualType, org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType, ServerHttpRequest request, ServerHttpResponse response, Map<String, Object> hints) Server-side only alternative toHttpMessageWriter.write(Publisher, ResolvableType, MediaType, ReactiveHttpOutputMessage, Map)with additional context available.reactor.core.publisher.Mono<Void> HttpMessageWriter.write(Publisher<? extends T> inputStream, org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType, ReactiveHttpOutputMessage message, Map<String, Object> hints) Write a given stream of object to the output message.reactor.core.publisher.Mono<Void> ResourceHttpMessageWriter.write(Publisher<? extends org.springframework.core.io.Resource> inputStream, @Nullable org.springframework.core.ResolvableType actualType, org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType, ServerHttpRequest request, ServerHttpResponse response, Map<String, Object> hints) reactor.core.publisher.Mono<Void> ResourceHttpMessageWriter.write(Publisher<? extends org.springframework.core.io.Resource> inputStream, org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType, ReactiveHttpOutputMessage message, Map<String, Object> hints) reactor.core.publisher.Mono<Void> ServerSentEventHttpMessageWriter.write(Publisher<?> input, org.springframework.core.ResolvableType actualType, org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType, ServerHttpRequest request, ServerHttpResponse response, Map<String, Object> hints) reactor.core.publisher.Mono<Void> ServerSentEventHttpMessageWriter.write(Publisher<?> input, org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType, ReactiveHttpOutputMessage message, Map<String, Object> hints) Method parameters in org.springframework.http.codec with type arguments of type MediaTypeModifier and TypeMethodDescriptionvoidAbstractJacksonEncoder.setStreamingMediaTypes(List<MediaType> mediaTypes) Configure "streaming" media types for which flushing should be performed automatically vs at the end of the stream.voidKotlinSerializationStringEncoder.setStreamingMediaTypes(Collection<MediaType> streamingMediaTypes) Set streamingMediaTypes. -
Uses of MediaType in org.springframework.http.codec.json
Methods in org.springframework.http.codec.json that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionAbstractJackson2Encoder.getStreamingMediaTypes()Deprecated, for removal: This API element is subject to removal in a future version.GsonEncoder.getStreamingMediaTypes()Methods in org.springframework.http.codec.json with parameters of type MediaTypeModifier and TypeMethodDescriptionAbstractJackson2Encoder.getEncodeHints(@Nullable org.springframework.core.ResolvableType actualType, org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType, ServerHttpRequest request, ServerHttpResponse response) Deprecated, for removal: This API element is subject to removal in a future version.Method parameters in org.springframework.http.codec.json with type arguments of type MediaTypeModifier and TypeMethodDescriptionvoidAbstractJackson2Encoder.setStreamingMediaTypes(List<MediaType> mediaTypes) Deprecated, for removal: This API element is subject to removal in a future version.Configure "streaming" media types for which flushing should be performed automatically vs at the end of the stream.voidGsonEncoder.setStreamingMediaTypes(List<MediaType> mediaTypes) Configure "streaming" media types for which flushing should be performed automatically vs at the end of the stream. -
Uses of MediaType in org.springframework.http.codec.multipart
Methods in org.springframework.http.codec.multipart that return MediaTypeModifier and TypeMethodDescriptionprotected MediaTypeMultipartWriterSupport.getMultipartMediaType(@Nullable MediaType mediaType, byte[] boundary) Prepare theMediaTypeto use by adding "boundary" and "charset" parameters to the givenmediaTypeor "multipart/form-data" otherwise by default.Methods in org.springframework.http.codec.multipart that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionDefaultPartHttpMessageReader.getReadableMediaTypes()MultipartHttpMessageReader.getReadableMediaTypes()PartEventHttpMessageReader.getReadableMediaTypes()MultipartWriterSupport.getWritableMediaTypes()Methods in org.springframework.http.codec.multipart with parameters of type MediaTypeModifier and TypeMethodDescriptionbooleanDefaultPartHttpMessageReader.canRead(org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType) booleanMultipartHttpMessageReader.canRead(org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType) booleanPartEventHttpMessageReader.canRead(org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType) booleanMultipartHttpMessageWriter.canWrite(org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType) booleanPartEventHttpMessageWriter.canWrite(org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType) booleanPartHttpMessageWriter.canWrite(org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType) static reactor.core.publisher.Flux<FilePartEvent> FilePartEvent.create(String partName, String filename, MediaType contentType, reactor.core.publisher.Flux<org.springframework.core.io.buffer.DataBuffer> contents) Creates a stream ofFilePartEventobjects based on the given name, FilePartEvent.filename(), content-type, and contents.static reactor.core.publisher.Flux<FilePartEvent> FilePartEvent.create(String partName, String filename, MediaType contentType, reactor.core.publisher.Flux<org.springframework.core.io.buffer.DataBuffer> contents, @Nullable Consumer<HttpHeaders> headersConsumer) Creates a stream ofFilePartEventobjects based on the given name, FilePartEvent.filename(), content-type, and contents.protected MediaTypeMultipartWriterSupport.getMultipartMediaType(@Nullable MediaType mediaType, byte[] boundary) Prepare theMediaTypeto use by adding "boundary" and "charset" parameters to the givenmediaTypeor "multipart/form-data" otherwise by default.reactor.core.publisher.Mono<Void> MultipartHttpMessageWriter.write(Publisher<? extends org.springframework.util.MultiValueMap<String, ?>> inputStream, org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType, ReactiveHttpOutputMessage outputMessage, Map<String, Object> hints) reactor.core.publisher.Mono<Void> PartEventHttpMessageWriter.write(Publisher<? extends PartEvent> partDataStream, org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType, ReactiveHttpOutputMessage outputMessage, Map<String, Object> hints) reactor.core.publisher.Mono<Void> PartHttpMessageWriter.write(Publisher<? extends Part> parts, org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType, ReactiveHttpOutputMessage outputMessage, Map<String, Object> hints) Constructor parameters in org.springframework.http.codec.multipart with type arguments of type MediaTypeModifierConstructorDescriptionprotectedMultipartWriterSupport(List<MediaType> supportedMediaTypes) Constructor with the list of supported media types. -
Uses of MediaType in org.springframework.http.codec.protobuf
Methods in org.springframework.http.codec.protobuf that return MediaTypeModifier and TypeMethodDescriptionprotected MediaTypeProtobufHttpMessageWriter.getStreamingContentType(@Nullable MediaType mediaType) Return theMediaTypeto use when the input Publisher is multivalued.Methods in org.springframework.http.codec.protobuf that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionProtobufEncoder.getStreamingMediaTypes()ProtobufJsonEncoder.getStreamingMediaTypes()Methods in org.springframework.http.codec.protobuf with parameters of type MediaTypeModifier and TypeMethodDescriptionprotected MediaTypeProtobufHttpMessageWriter.getStreamingContentType(@Nullable MediaType mediaType) Return theMediaTypeto use when the input Publisher is multivalued.reactor.core.publisher.Mono<Void> ProtobufHttpMessageWriter.write(Publisher<? extends com.google.protobuf.Message> inputStream, org.springframework.core.ResolvableType elementType, @Nullable MediaType mediaType, ReactiveHttpOutputMessage outputMessage, Map<String, Object> hints) -
Uses of MediaType in org.springframework.http.converter
Methods in org.springframework.http.converter that return MediaTypeModifier and TypeMethodDescriptionAbstractHttpMessageConverter.getDefaultContentType(T t) Returns the default content type for the given type.BufferedImageHttpMessageConverter.getDefaultContentType()Returns the defaultContent-Typeto be used for writing.protected MediaTypeResourceHttpMessageConverter.getDefaultContentType(org.springframework.core.io.Resource resource) protected MediaTypeResourceRegionHttpMessageConverter.getDefaultContentType(Object object) protected MediaTypeFormHttpMessageConverter.getFormContentType(@Nullable MediaType contentType) Return the content type used to write forms, either the given content type or otherwiseapplication/x-www-form-urlencoded.Methods in org.springframework.http.converter that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionAbstractJacksonHttpMessageConverter.getMappersForType(Class<?> clazz) Return ObjectMapper registrations for the given class, if any.AbstractJacksonHttpMessageConverter.getMediaTypesForProblemDetail()Return the supported media type(s) forProblemDetail.AbstractHttpMessageConverter.getSupportedMediaTypes()AbstractJacksonHttpMessageConverter.getSupportedMediaTypes(Class<?> clazz) AbstractKotlinSerializationHttpMessageConverter.getSupportedMediaTypes(Class<?> clazz) BufferedImageHttpMessageConverter.getSupportedMediaTypes()FormHttpMessageConverter.getSupportedMediaTypes()Return the list of media types supported by this converter.HttpMessageConverter.getSupportedMediaTypes()Return the list of media types supported by this converter.HttpMessageConverter.getSupportedMediaTypes(Class<?> clazz) Return the list of media types supported by this converter for the given class.Methods in org.springframework.http.converter with parameters of type MediaTypeModifier and TypeMethodDescriptionprotected voidAbstractHttpMessageConverter.addDefaultHeaders(HttpHeaders headers, T t, @Nullable MediaType contentType) Add default headers to the output message.voidResourceHttpMessageConverter.addDefaultHeaders(HttpOutputMessage message, org.springframework.core.io.Resource resource, @Nullable MediaType contentType) Add the default headers for the given resource to the given message.protected voidStringHttpMessageConverter.addDefaultHeaders(HttpHeaders headers, String s, @Nullable MediaType type) voidFormHttpMessageConverter.addSupportedMediaTypes(MediaType... supportedMediaTypes) AddMediaTypeobjects to be supported by this converter.booleanAbstractGenericHttpMessageConverter.canRead(Type type, @Nullable Class<?> contextClass, @Nullable MediaType mediaType) booleanThis implementation checks if the given class is supported, and if the supported media types include the given media type.protected booleanbooleanAbstractJacksonHttpMessageConverter.canRead(org.springframework.core.ResolvableType type, @Nullable MediaType mediaType) booleanAbstractKotlinSerializationHttpMessageConverter.canRead(org.springframework.core.ResolvableType type, @Nullable MediaType mediaType) booleanbooleanbooleanbooleanGenericHttpMessageConverter.canRead(Type type, @Nullable Class<?> contextClass, @Nullable MediaType mediaType) Indicates whether the given type can be read by this converter.booleanIndicates whether the given class can be read by this converter.booleanbooleanbooleanResourceRegionHttpMessageConverter.canRead(Type type, @Nullable Class<?> contextClass, @Nullable MediaType mediaType) default booleanbooleanSmartHttpMessageConverter.canRead(org.springframework.core.ResolvableType type, @Nullable MediaType mediaType) Indicates whether the given type can be read by this converter.booleanAbstractGenericHttpMessageConverter.canWrite(@Nullable Type type, Class<?> clazz, @Nullable MediaType mediaType) booleanprotected booleanReturnstrueif the given media type includes any of the supported media types.booleanAbstractJacksonHttpMessageConverter.canWrite(org.springframework.core.ResolvableType type, Class<?> valueClass, @Nullable MediaType mediaType) booleanAbstractKotlinSerializationHttpMessageConverter.canWrite(org.springframework.core.ResolvableType type, Class<?> valueClass, @Nullable MediaType mediaType) booleanbooleanbooleanbooleanGenericHttpMessageConverter.canWrite(@Nullable Type type, Class<?> clazz, @Nullable MediaType mediaType) Indicates whether the given class can be written by this converter.booleanIndicates whether the given class can be written by this converter.booleanbooleanbooleanResourceRegionHttpMessageConverter.canWrite(@Nullable Type type, @Nullable Class<?> clazz, @Nullable MediaType mediaType) default booleanbooleanSmartHttpMessageConverter.canWrite(org.springframework.core.ResolvableType targetType, Class<?> valueClass, @Nullable MediaType mediaType) Indicates whether the given class can be written by this converter.protected tools.jackson.databind.ObjectWriterAbstractJacksonHttpMessageConverter.customizeWriter(tools.jackson.databind.ObjectWriter writer, @Nullable tools.jackson.databind.JavaType javaType, @Nullable MediaType contentType) Subclasses can use this method to customize theObjectWriterused for writing values.protected CharsetAbstractJacksonHttpMessageConverter.getCharset(@Nullable MediaType contentType) Determine the charset to use for JSON input.AbstractHttpMessageConverter.getContentLength(T t, @Nullable MediaType contentType) Returns the content length for the given type.protected LongByteArrayHttpMessageConverter.getContentLength(byte[] bytes, @Nullable MediaType contentType) protected LongObjectToStringHttpMessageConverter.getContentLength(Object obj, @Nullable MediaType contentType) ResourceHttpMessageConverter.getContentLength(org.springframework.core.io.Resource resource, @Nullable MediaType contentType) protected LongStringHttpMessageConverter.getContentLength(String str, @Nullable MediaType contentType) protected MediaTypeFormHttpMessageConverter.getFormContentType(@Nullable MediaType contentType) Return the content type used to write forms, either the given content type or otherwiseapplication/x-www-form-urlencoded.protected tools.jackson.core.JsonEncodingAbstractJacksonHttpMessageConverter.getJsonEncoding(@Nullable MediaType contentType) Determine the JSON encoding to use for the given content type.voidBufferedImageHttpMessageConverter.setDefaultContentType(@Nullable MediaType defaultContentType) Sets the defaultContent-Typeto be used for writing.final voidAbstractGenericHttpMessageConverter.write(T t, @Nullable Type type, @Nullable MediaType contentType, HttpOutputMessage outputMessage) This implementation sets the default headers by callingAbstractHttpMessageConverter.addDefaultHeaders(HttpHeaders, T, MediaType), and then callsAbstractGenericHttpMessageConverter.writeInternal(T, HttpOutputMessage).final voidAbstractHttpMessageConverter.write(T t, @Nullable MediaType contentType, HttpOutputMessage outputMessage) This implementation sets the default headers by callingAbstractHttpMessageConverter.addDefaultHeaders(HttpHeaders, T, MediaType), and then callsAbstractHttpMessageConverter.writeInternal(T, HttpOutputMessage).final voidAbstractSmartHttpMessageConverter.write(T t, org.springframework.core.ResolvableType type, @Nullable MediaType contentType, HttpOutputMessage outputMessage, @Nullable Map<String, Object> hints) This implementation sets the default headers by callingAbstractHttpMessageConverter.addDefaultHeaders(HttpHeaders, T, MediaType), and then callsAbstractSmartHttpMessageConverter.writeInternal(T, HttpOutputMessage).voidBufferedImageHttpMessageConverter.write(BufferedImage image, @Nullable MediaType contentType, HttpOutputMessage outputMessage) voidFormHttpMessageConverter.write(org.springframework.util.MultiValueMap<String, ?> map, @Nullable MediaType contentType, HttpOutputMessage outputMessage) voidGenericHttpMessageConverter.write(T t, @Nullable Type type, @Nullable MediaType contentType, HttpOutputMessage outputMessage) Write a given object to the given output message.voidHttpMessageConverter.write(T t, @Nullable MediaType contentType, HttpOutputMessage outputMessage) Write a given object to the given output message.voidSmartHttpMessageConverter.write(T t, org.springframework.core.ResolvableType type, @Nullable MediaType contentType, HttpOutputMessage outputMessage, @Nullable Map<String, Object> hints) Write a given object to the given output message.default voidSmartHttpMessageConverter.write(T t, @Nullable MediaType contentType, HttpOutputMessage outputMessage) Method parameters in org.springframework.http.converter with type arguments of type MediaTypeModifier and TypeMethodDescriptionvoidAbstractJacksonHttpMessageConverter.registerMappersForType(Class<?> clazz, Consumer<Map<MediaType, T>> registrar) Configure theObjectMapperinstances to use for the givenClass.voidAbstractHttpMessageConverter.setSupportedMediaTypes(List<MediaType> supportedMediaTypes) Set the list ofMediaTypeobjects supported by this converter.voidAbstractJacksonHttpMessageConverter.setSupportedMediaTypes(List<MediaType> supportedMediaTypes) voidFormHttpMessageConverter.setSupportedMediaTypes(List<MediaType> supportedMediaTypes) Set the list ofMediaTypeobjects supported by this converter.Constructors in org.springframework.http.converter with parameters of type MediaTypeModifierConstructorDescriptionprotectedAbstractGenericHttpMessageConverter(Charset defaultCharset, MediaType... supportedMediaTypes) Construct anAbstractGenericHttpMessageConverterwith a default charset and multiple supported media types.protectedAbstractGenericHttpMessageConverter(MediaType supportedMediaType) Construct anAbstractGenericHttpMessageConverterwith one supported media type.protectedAbstractGenericHttpMessageConverter(MediaType... supportedMediaTypes) Construct anAbstractGenericHttpMessageConverterwith multiple supported media type.protectedAbstractHttpMessageConverter(Charset defaultCharset, MediaType... supportedMediaTypes) Construct anAbstractHttpMessageConverterwith a default charset and multiple supported media types.protectedAbstractHttpMessageConverter(MediaType supportedMediaType) Construct anAbstractHttpMessageConverterwith one supported media type.protectedAbstractHttpMessageConverter(MediaType... supportedMediaTypes) Construct anAbstractHttpMessageConverterwith multiple supported media types.protectedAbstractJacksonHttpMessageConverter(tools.jackson.databind.cfg.MapperBuilder<T, ?> builder, MediaType supportedMediaType) Construct a new instance with the providedbuildercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader)andMediaType.protectedAbstractJacksonHttpMessageConverter(tools.jackson.databind.cfg.MapperBuilder<T, ?> builder, MediaType... supportedMediaTypes) Construct a new instance with the providedbuildercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader)andMediaTypes.protectedAbstractJacksonHttpMessageConverter(T mapper, MediaType supportedMediaType) Construct a new instance with the providedObjectMapperandMediaType.protectedAbstractJacksonHttpMessageConverter(T mapper, MediaType... supportedMediaTypes) Construct a new instance with the providedObjectMapperandMediaTypes.protectedAbstractKotlinSerializationHttpMessageConverter(T format, Predicate<org.springframework.core.ResolvableType> typePredicate, MediaType... supportedMediaTypes) Creates a new instance with the given format and supported mime types which only converts types for which the specified predicate returnstrue.protectedAbstractKotlinSerializationHttpMessageConverter(T format, MediaType... supportedMediaTypes) Creates a new instance with the given format and supported mime types which only converters types annotated with@Serializableat type or generics level.protectedAbstractSmartHttpMessageConverter(MediaType supportedMediaType) Construct anAbstractSmartHttpMessageConverterwith one supported media type.protectedAbstractSmartHttpMessageConverter(MediaType... supportedMediaTypes) Construct anAbstractSmartHttpMessageConverterwith multiple supported media type.protectedKotlinSerializationBinaryHttpMessageConverter(T format, Predicate<org.springframework.core.ResolvableType> typePredicate, MediaType... supportedMediaTypes) Creates a new instance with the given format and supported mime types which only converts types for which the specified predicate returnstrue.protectedKotlinSerializationBinaryHttpMessageConverter(T format, MediaType... supportedMediaTypes) Creates a new instance with the given format and supported mime types which only converters types annotated with@Serializableat type or generics level.protectedKotlinSerializationStringHttpMessageConverter(T format, Predicate<org.springframework.core.ResolvableType> typePredicate, MediaType... supportedMediaTypes) Creates a new instance with the given format and supported mime types which only converts types for which the specified predicate returnstrue.protectedKotlinSerializationStringHttpMessageConverter(T format, MediaType... supportedMediaTypes) Creates a new instance with the given format and supported mime types which only converters types annotated with@Serializableat type or generics level. -
Uses of MediaType in org.springframework.http.converter.feed
Constructors in org.springframework.http.converter.feed with parameters of type MediaTypeModifierConstructorDescriptionprotectedAbstractWireFeedHttpMessageConverter(MediaType supportedMediaType) -
Uses of MediaType in org.springframework.http.converter.json
Methods in org.springframework.http.converter.json that return MediaTypeModifier and TypeMethodDescriptionAbstractJackson2HttpMessageConverter.getDefaultContentType(Object object) Deprecated, for removal: This API element is subject to removal in a future version.Methods in org.springframework.http.converter.json that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionAbstractJackson2HttpMessageConverter.getMediaTypesForProblemDetail()Deprecated, for removal: This API element is subject to removal in a future version.Return the supported media type(s) forProblemDetail.JacksonJsonHttpMessageConverter.getMediaTypesForProblemDetail()MappingJackson2HttpMessageConverter.getMediaTypesForProblemDetail()Deprecated, for removal: This API element is subject to removal in a future version.AbstractJackson2HttpMessageConverter.getObjectMappersForType(Class<?> clazz) Deprecated, for removal: This API element is subject to removal in a future version.Return ObjectMapper registrations for the given class, if any.AbstractJackson2HttpMessageConverter.getSupportedMediaTypes(Class<?> clazz) Deprecated, for removal: This API element is subject to removal in a future version.Methods in org.springframework.http.converter.json with parameters of type MediaTypeModifier and TypeMethodDescriptionbooleanDeprecated, for removal: This API element is subject to removal in a future version.booleanAbstractJackson2HttpMessageConverter.canRead(Type type, @Nullable Class<?> contextClass, @Nullable MediaType mediaType) Deprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.protected com.fasterxml.jackson.databind.ObjectWriterAbstractJackson2HttpMessageConverter.customizeWriter(com.fasterxml.jackson.databind.ObjectWriter writer, @Nullable com.fasterxml.jackson.databind.JavaType javaType, @Nullable MediaType contentType) Deprecated, for removal: This API element is subject to removal in a future version.Subclasses can use this method to customizeObjectWriterused for writing values.protected CharsetAbstractJackson2HttpMessageConverter.getCharset(@Nullable MediaType contentType) Deprecated, for removal: This API element is subject to removal in a future version.Determine the charset to use for JSON input.AbstractJackson2HttpMessageConverter.getContentLength(Object object, @Nullable MediaType contentType) Deprecated, for removal: This API element is subject to removal in a future version.protected com.fasterxml.jackson.core.JsonEncodingAbstractJackson2HttpMessageConverter.getJsonEncoding(@Nullable MediaType contentType) Deprecated, for removal: This API element is subject to removal in a future version.Determine the JSON encoding to use for the given content type.Method parameters in org.springframework.http.converter.json with type arguments of type MediaTypeModifier and TypeMethodDescriptionvoidAbstractJackson2HttpMessageConverter.registerObjectMappersForType(Class<?> clazz, Consumer<Map<MediaType, com.fasterxml.jackson.databind.ObjectMapper>> registrar) Deprecated, for removal: This API element is subject to removal in a future version.Configure theObjectMapperinstances to use for the givenClass.voidAbstractJackson2HttpMessageConverter.setSupportedMediaTypes(List<MediaType> supportedMediaTypes) Deprecated, for removal: This API element is subject to removal in a future version.Constructors in org.springframework.http.converter.json with parameters of type MediaTypeModifierConstructorDescriptionprotectedAbstractJackson2HttpMessageConverter(com.fasterxml.jackson.databind.ObjectMapper objectMapper, MediaType supportedMediaType) Deprecated, for removal: This API element is subject to removal in a future version.protectedAbstractJackson2HttpMessageConverter(com.fasterxml.jackson.databind.ObjectMapper objectMapper, MediaType... supportedMediaTypes) Deprecated, for removal: This API element is subject to removal in a future version. -
Uses of MediaType in org.springframework.http.converter.protobuf
Fields in org.springframework.http.converter.protobuf declared as MediaTypeModifier and TypeFieldDescriptionstatic final MediaTypeProtobufHttpMessageConverter.PLUS_PROTOBUFThe media-type for protobufapplication/*+x-protobuf.static final MediaTypeProtobufHttpMessageConverter.PROTOBUFThe media-type for protobufapplication/x-protobuf.Methods in org.springframework.http.converter.protobuf that return MediaTypeModifier and TypeMethodDescriptionprotected MediaTypeProtobufHttpMessageConverter.getDefaultContentType(com.google.protobuf.Message message) ProtobufHttpMessageConverter.ProtobufFormatDelegate.supportedMediaTypes()Return the supported media types for the converter.Methods in org.springframework.http.converter.protobuf with parameters of type MediaTypeModifier and TypeMethodDescriptionprotected booleanvoidProtobufHttpMessageConverter.ProtobufFormatDelegate.merge(HttpInputMessage inputMessage, MediaType contentType, Charset charset, com.google.protobuf.Message.Builder builder, com.google.protobuf.ExtensionRegistry extensionRegistry) Use merge methods onMessage.Builderto read a message from the givenHttpInputMessage.voidProtobufHttpMessageConverter.ProtobufFormatDelegate.print(com.google.protobuf.Message message, HttpOutputMessage outputMessage, MediaType contentType, Charset charset) Use print methods onMessage.Builderto write the message to the givenHttpOutputMessage.booleanProtobufHttpMessageConverter.ProtobufFormatDelegate.supportsWriteOnly(@Nullable MediaType mediaType) Whether the media type is supported for writing. -
Uses of MediaType in org.springframework.http.converter.xml
Methods in org.springframework.http.converter.xml that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionJacksonXmlHttpMessageConverter.getMediaTypesForProblemDetail()MappingJackson2XmlHttpMessageConverter.getMediaTypesForProblemDetail()Deprecated, for removal: This API element is subject to removal in a future version.Methods in org.springframework.http.converter.xml with parameters of type MediaTypeModifier and TypeMethodDescriptionbooleanAlways returnsfalsesince Jaxb2CollectionHttpMessageConverter required generic type information in order to read a Collection.booleanJaxb2CollectionHttpMessageConverter.canRead(Type type, @Nullable Class<?> contextClass, @Nullable MediaType mediaType) Indicates whether the given type can be read by this converter.booleanbooleanbooleanAlways returnsfalsesince Jaxb2CollectionHttpMessageConverter does not convert collections to XML.booleanJaxb2CollectionHttpMessageConverter.canWrite(@Nullable Type type, @Nullable Class<?> clazz, @Nullable MediaType mediaType) Always returnsfalsesince Jaxb2CollectionHttpMessageConverter does not convert collections to XML.booleanbooleanSourceHttpMessageConverter.getContentLength(T t, @Nullable MediaType contentType) voidJaxb2CollectionHttpMessageConverter.write(T t, @Nullable Type type, @Nullable MediaType contentType, HttpOutputMessage outputMessage) -
Uses of MediaType in org.springframework.web
Methods in org.springframework.web that return MediaTypeModifier and TypeMethodDescriptionHttpMediaTypeNotSupportedException.getContentType()Return the HTTP request content type method that caused the failure.Methods in org.springframework.web that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionHttpMediaTypeException.getSupportedMediaTypes()Return the list of supported media types.Constructors in org.springframework.web with parameters of type MediaTypeModifierConstructorDescriptionHttpMediaTypeNotSupportedException(@Nullable MediaType contentType, List<MediaType> mediaTypes) Create a new HttpMediaTypeNotSupportedException.HttpMediaTypeNotSupportedException(@Nullable MediaType contentType, List<MediaType> mediaTypes, @Nullable HttpMethod httpMethod) Create a new HttpMediaTypeNotSupportedException.HttpMediaTypeNotSupportedException(@Nullable MediaType contentType, List<MediaType> supportedMediaTypes, @Nullable HttpMethod httpMethod, String message) Create a new HttpMediaTypeNotSupportedException.Constructor parameters in org.springframework.web with type arguments of type MediaTypeModifierConstructorDescriptionprotectedHttpMediaTypeException(@Nullable String message, List<MediaType> supportedMediaTypes, @Nullable String messageDetailCode, Object @Nullable [] messageDetailArguments) Create a new HttpMediaTypeException with a list of supported media types.HttpMediaTypeNotAcceptableException(List<MediaType> mediaTypes) Create a new HttpMediaTypeNotSupportedException.HttpMediaTypeNotSupportedException(@Nullable String message, List<MediaType> mediaTypes) Create a new HttpMediaTypeNotSupportedException for a parse error.HttpMediaTypeNotSupportedException(@Nullable MediaType contentType, List<MediaType> mediaTypes) Create a new HttpMediaTypeNotSupportedException.HttpMediaTypeNotSupportedException(@Nullable MediaType contentType, List<MediaType> mediaTypes, @Nullable HttpMethod httpMethod) Create a new HttpMediaTypeNotSupportedException.HttpMediaTypeNotSupportedException(@Nullable MediaType contentType, List<MediaType> supportedMediaTypes, @Nullable HttpMethod httpMethod, String message) Create a new HttpMediaTypeNotSupportedException. -
Uses of MediaType in org.springframework.web.accept
Fields in org.springframework.web.accept with type parameters of type MediaTypeModifier and TypeFieldDescriptionContentNegotiationStrategy.MEDIA_TYPE_ALL_LISTA singleton list withMediaType.ALLthat is returned fromContentNegotiationStrategy.resolveMediaTypes(NativeWebRequest)when no specific media types are requested.Methods in org.springframework.web.accept that return MediaTypeModifier and TypeMethodDescriptionAbstractMappingContentNegotiationStrategy.handleNoMatch(NativeWebRequest request, String key) Override to provide handling when a key is not resolved via.MappingMediaTypeFileExtensionResolver.lookupMediaType(String extension) Use this method for a reverse lookup from extension to MediaType.Methods in org.springframework.web.accept that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionMappingMediaTypeFileExtensionResolver.getAllMediaTypes()FixedContentNegotiationStrategy.getContentTypes()Return the configured list of media types.ContentNegotiationManager.getMediaTypeMappings()Return all registered lookup key to media type mappings by iteratingMediaTypeFileExtensionResolvers.MappingMediaTypeFileExtensionResolver.getMediaTypes()AbstractMappingContentNegotiationStrategy.resolveMediaTypeKey(NativeWebRequest webRequest, @Nullable String key) An alternative toAbstractMappingContentNegotiationStrategy.resolveMediaTypes(NativeWebRequest)that accepts an already extracted key.AbstractMappingContentNegotiationStrategy.resolveMediaTypes(NativeWebRequest webRequest) ContentNegotiationManager.resolveMediaTypes(NativeWebRequest request) ContentNegotiationStrategy.resolveMediaTypes(NativeWebRequest webRequest) Resolve the given request to a list of media types.FixedContentNegotiationStrategy.resolveMediaTypes(NativeWebRequest request) HeaderContentNegotiationStrategy.resolveMediaTypes(NativeWebRequest request) Resolve the given request to a list of media types.Methods in org.springframework.web.accept with parameters of type MediaTypeModifier and TypeMethodDescriptionprotected voidMappingMediaTypeFileExtensionResolver.addMapping(String extension, MediaType mediaType) Map an extension to a MediaType.voidContentNegotiationManagerFactoryBean.addMediaType(String key, MediaType mediaType) An alternative toContentNegotiationManagerFactoryBean.setMediaTypes(Properties)for programmatic registrations.protected voidAbstractMappingContentNegotiationStrategy.handleMatch(String key, MediaType mediaType) Override to provide handling when a key is successfully resolved viaMappingMediaTypeFileExtensionResolver.lookupMediaType(String).ContentNegotiationManager.resolveFileExtensions(MediaType mediaType) MappingMediaTypeFileExtensionResolver.resolveFileExtensions(MediaType mediaType) MediaTypeFileExtensionResolver.resolveFileExtensions(MediaType mediaType) Resolve the given media type to a list of file extensions.voidContentNegotiationManagerFactoryBean.setDefaultContentType(MediaType contentType) Set the default content type to use when no content type is requested.StandardApiVersionDeprecationHandler.VersionSpec.setDeprecationLink(URI uri, MediaType mediaType) Variation ofStandardApiVersionDeprecationHandler.VersionSpec.setDeprecationLink(URI)for use with a media type other than "text/html".StandardApiVersionDeprecationHandler.VersionSpec.setSunsetLink(URI uri, MediaType mediaType) Variation ofStandardApiVersionDeprecationHandler.VersionSpec.setSunsetLink(URI)for use with a media type other than "text/html".Method parameters in org.springframework.web.accept with type arguments of type MediaTypeModifier and TypeMethodDescriptionvoidContentNegotiationManagerFactoryBean.addMediaTypes(@Nullable Map<String, MediaType> mediaTypes) An alternative toContentNegotiationManagerFactoryBean.setMediaTypes(Properties)for programmatic registrations.voidContentNegotiationManagerFactoryBean.setDefaultContentTypes(List<MediaType> contentTypes) Set the default content types to use when no content type is requested.Constructors in org.springframework.web.accept with parameters of type MediaTypeModifierConstructorDescriptionFixedContentNegotiationStrategy(MediaType contentType) Constructor with a single defaultMediaType.MediaTypeParamApiVersionResolver(MediaType compatibleMediaType, String paramName) Create an instance.Constructor parameters in org.springframework.web.accept with type arguments of type MediaTypeModifierConstructorDescriptionAbstractMappingContentNegotiationStrategy(@Nullable Map<String, MediaType> mediaTypes) Create an instance with the given map of file extensions and media types.FixedContentNegotiationStrategy(List<MediaType> contentTypes) Constructor with an ordered List of defaultMediaType's to return for use in applications that support a variety of content types.MappingMediaTypeFileExtensionResolver(@Nullable Map<String, MediaType> mediaTypes) Create an instance with the given map of file extensions and media types.ParameterContentNegotiationStrategy(Map<String, MediaType> mediaTypes) Create an instance with the given map of file extensions and media types. -
Uses of MediaType in org.springframework.web.client
Methods in org.springframework.web.client that return MediaTypeModifier and TypeMethodDescriptionprotected MediaTypeHttpMessageConverterExtractor.getContentType(ClientHttpResponse response) Determine the Content-Type of the response based on the "Content-Type" header or otherwise default toMediaType.APPLICATION_OCTET_STREAM.UnknownContentTypeException.getContentType()Return the content type of the response, or "application/octet-stream".Methods in org.springframework.web.client with parameters of type MediaTypeModifier and TypeMethodDescriptionSet the list of acceptable media types, as specified by theAcceptheader.RestClient.RequestBodySpec.contentType(MediaType contentType) Set the media type of the body, as specified by theContent-Typeheader.Constructors in org.springframework.web.client with parameters of type MediaTypeModifierConstructorDescriptionUnknownContentTypeException(Type targetType, MediaType contentType, int statusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody) Construct a new instance of with the given response data.UnknownContentTypeException(Type targetType, MediaType contentType, HttpStatusCode statusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody) Construct a new instance of with the given response data. -
Uses of MediaType in org.springframework.web.method.annotation
Methods in org.springframework.web.method.annotation that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionExceptionHandlerMappingInfo.getProducibleTypes()Return the producible media types by this handler.Methods in org.springframework.web.method.annotation with parameters of type MediaTypeModifier and TypeMethodDescriptionExceptionHandlerMethodResolver.resolveExceptionMapping(Throwable exception, MediaType mediaType) ExceptionHandlerMethodResolver.resolveExceptionMappingByExceptionType(Class<? extends Throwable> exceptionType, MediaType mediaType) Find aMethodto handle the given exception type and media type. -
Uses of MediaType in org.springframework.web.server
Methods in org.springframework.web.server that return MediaTypeModifier and TypeMethodDescriptionUnsupportedMediaTypeStatusException.getContentType()Return the request Content-Type header if it was parsed successfully, ornullotherwise.Methods in org.springframework.web.server that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionNotAcceptableStatusException.getSupportedMediaTypes()Return the list of supported content types in cases when the Accept header is parsed but not supported, or an empty list otherwise.UnsupportedMediaTypeStatusException.getSupportedMediaTypes()Return the list of supported content types in cases when the Content-Type header is parsed but not supported, or an empty list otherwise.Constructors in org.springframework.web.server with parameters of type MediaTypeModifierConstructorDescriptionUnsupportedMediaTypeStatusException(@Nullable MediaType contentType, List<MediaType> supportedTypes) Constructor for when the Content-Type can be parsed but is not supported.UnsupportedMediaTypeStatusException(@Nullable MediaType contentType, List<MediaType> supportedTypes, @Nullable org.springframework.core.ResolvableType bodyType) Constructor for when trying to encode from or decode to a specific Java type.UnsupportedMediaTypeStatusException(@Nullable MediaType contentType, List<MediaType> supportedTypes, @Nullable org.springframework.core.ResolvableType bodyType, @Nullable HttpMethod method) Constructor for when trying to encode from or decode to a specific Java type.UnsupportedMediaTypeStatusException(@Nullable MediaType contentType, List<MediaType> supportedTypes, @Nullable HttpMethod method) Constructor that provides the HTTP method.Constructor parameters in org.springframework.web.server with type arguments of type MediaTypeModifierConstructorDescriptionNotAcceptableStatusException(List<MediaType> mediaTypes) Constructor for when the requested Content-Type is not supported.UnsupportedMediaTypeStatusException(@Nullable String reason, List<MediaType> supportedTypes) Constructor for when the specified Content-Type is invalid.UnsupportedMediaTypeStatusException(@Nullable MediaType contentType, List<MediaType> supportedTypes) Constructor for when the Content-Type can be parsed but is not supported.UnsupportedMediaTypeStatusException(@Nullable MediaType contentType, List<MediaType> supportedTypes, @Nullable org.springframework.core.ResolvableType bodyType) Constructor for when trying to encode from or decode to a specific Java type.UnsupportedMediaTypeStatusException(@Nullable MediaType contentType, List<MediaType> supportedTypes, @Nullable org.springframework.core.ResolvableType bodyType, @Nullable HttpMethod method) Constructor for when trying to encode from or decode to a specific Java type.UnsupportedMediaTypeStatusException(@Nullable MediaType contentType, List<MediaType> supportedTypes, @Nullable HttpMethod method) Constructor that provides the HTTP method. -
Uses of MediaType in org.springframework.web.service.invoker
Methods in org.springframework.web.service.invoker that return MediaTypeModifier and TypeMethodDescriptionHttpRequestValues.Builder.getContentType()HttpRequestValues.Metadata.getContentType()Return the content type, if set already.Methods in org.springframework.web.service.invoker that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionHttpRequestValues.Builder.getAcceptMediaTypes()HttpRequestValues.Metadata.getAcceptMediaTypes()Return the acceptable media types, if set already.Methods in org.springframework.web.service.invoker with parameters of type MediaTypeModifier and TypeMethodDescriptionHttpRequestValues.Builder.setContentType(MediaType contentType) Set the media type for the requestContent-Typeheader.ReactiveHttpRequestValues.Builder.setContentType(MediaType contentType) Method parameters in org.springframework.web.service.invoker with type arguments of type MediaTypeModifier and TypeMethodDescriptionSet the media types for the requestAcceptheader.