类的使用
cn.taketoday.http.MediaType
使用MediaType的程序包
程序包
说明
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.
This package contains classes used to determine the requested the media types in a request.
Request context parameter resolvers
Core package of the client-side web support.
Common MVC logic for matching incoming requests based on conditions.
Provides the types that make up Infra functional web framework.
Method handler
Provides a foundation for both the reactive client and server subpackages.
Provides a reactive
WebClient
that builds on top of the
cn.taketoday.http.client.reactive reactive HTTP adapter layer.Classes supporting the
cn.taketoday.web.reactive.function.client package.Support classes for serving static resources.
Support for creating a client proxy for an HTTP service annotated with
HttpExchange methods.Provides standard View and ViewResolver implementations,
including abstract base classes for custom implementations.
-
cn.taketoday.http中MediaType的使用
声明为MediaType的cn.taketoday.http中的字段修饰符和类型字段说明static final MediaTypeMediaType.ALLPublic constant media type that includes all media ranges (i.estatic final MediaTypeMediaType.APPLICATION_ATOM_XMLPublic constant media type forapplication/atom+xml.static final MediaTypeMediaType.APPLICATION_CBORPublic constant media type forapplication/cbor.static final MediaTypeMediaType.APPLICATION_FORM_URLENCODEDPublic constant media type forapplication/x-www-form-urlencoded.static final MediaTypeMediaType.APPLICATION_JSONPublic constant media type forapplication/json.static final MediaTypeMediaType.APPLICATION_NDJSONPublic constant media type forapplication/x-ndjson.static final MediaTypeMediaType.APPLICATION_OCTET_STREAMPublic constant media type forapplication/octet-stream.static final MediaTypeMediaType.APPLICATION_PDFPublic constant media type forapplication/pdf.static final MediaTypeMediaType.APPLICATION_PROBLEM_JSONPublic constant media type forapplication/problem+json.static final MediaTypeMediaType.APPLICATION_PROBLEM_XMLPublic constant media type forapplication/problem+xml.static final MediaTypeMediaType.APPLICATION_RSS_XMLPublic constant media type forapplication/rss+xml.static final MediaTypeMediaType.APPLICATION_STREAM_JSONPublic constant media type forapplication/stream+json.static final MediaTypeMediaType.APPLICATION_XHTML_XMLPublic constant media type forapplication/xhtml+xml.static final MediaTypeMediaType.APPLICATION_XMLPublic constant media type forapplication/xml.private MediaTypeReadOnlyHttpHeaders.cachedContentTypestatic final MediaTypeMediaType.IMAGE_GIFPublic constant media type forimage/gif.static final MediaTypeMediaType.IMAGE_JPEGPublic constant media type forimage/jpeg.static final MediaTypeMediaType.IMAGE_PNGPublic constant media type forimage/png.static final MediaTypeMediaType.MULTIPART_FORM_DATAPublic constant media type formultipart/form-data.static final MediaTypeMediaType.MULTIPART_MIXEDPublic constant media type formultipart/mixed.static final MediaTypeMediaType.MULTIPART_RELATEDPublic constant media type formultipart/related.static final MediaTypeMediaType.TEXT_EVENT_STREAMPublic constant media type fortext/event-stream.static final MediaTypeMediaType.TEXT_HTMLPublic constant media type fortext/html.static final MediaTypeMediaType.TEXT_MARKDOWNPublic constant media type fortext/markdown.static final MediaTypeMediaType.TEXT_PLAINPublic constant media type fortext/plain.static final MediaTypeMediaType.TEXT_XMLPublic constant media type fortext/xml.类型参数类型为MediaType的cn.taketoday.http中的字段修饰符和类型字段说明ReadOnlyHttpHeaders.cachedAcceptMediaTypeFactory.fileExtensionToMediaTypesstatic final Comparator<MediaType>MediaType.QUALITY_VALUE_COMPARATORComparator used bysortByQualityValue(List).static final Comparator<MediaType>MediaType.SPECIFICITY_COMPARATORComparator used bysortBySpecificity(List).返回MediaType的cn.taketoday.http中的方法修饰符和类型方法说明static MediaTypeMediaType.asMediaType(cn.taketoday.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.static MediaTypeMediaType.fromFileName(String filename) Determine a media type for the given file name, if possible.static MediaTypeMediaType.fromResource(cn.taketoday.core.io.Resource resource) Determine a media type for the given resource, if possible.HttpHeaders.getContentType()Return the media type of the body, as specified by theContent-Typeheader.ReadOnlyHttpHeaders.getContentType()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返回变量类型为MediaType的类型的cn.taketoday.http中的方法修饰符和类型方法说明MediaType.asMediaTypes(List<cn.taketoday.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.ReadOnlyHttpHeaders.getAccept()HttpHeaders.getAcceptPatch()Return the list of acceptable media types forPATCHmethods, as specified by theAccept-Patchheader.MediaTypeFactory.getMediaType(cn.taketoday.core.io.Resource resource) Determine a media type for the given resource, if possible.MediaTypeFactory.getMediaType(String filename) Determine a media type for the given file name, if possible.MediaTypeFactory.getMediaTypes(String filename) Determine the media types for the given file name, if possible.MediaType.parseMediaTypes(String mediaTypes) Parse the comma-separated string into a list ofMediaTypeobjects.MediaType.parseMediaTypes(List<String> mediaTypes) Parse the given list of (potentially) comma-separated strings into a list ofMediaTypeobjects.MediaTypeFactory.parseMimeTypes()Parse themime.typesfile found in the resources.参数类型为MediaType的cn.taketoday.http中的方法修饰符和类型方法说明Set 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.RequestEntity.DefaultBodyBuilder.contentType(MediaType contentType) ResponseEntity.BodyBuilder.contentType(MediaType contentType) Set the media type of the body, as specified by theContent-Typeheader.ResponseEntity.DefaultBuilder.contentType(MediaType contentType) 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(MediaType other) Indicate whether thisMediaTypeis compatible with the given media type.voidHttpHeaders.setContentType(MediaType mediaType) Set the media type of the body, as specified by theContent-Typeheader.类型变量类型为MediaType的cn.taketoday.http中的方法参数修饰符和类型方法说明voidHttpHeaders.setAccept(Collection<MediaType> acceptableMediaTypes) Set the list of acceptable media types, as specified by theAcceptheader.voidHttpHeaders.setAcceptPatch(Collection<MediaType> mediaTypes) static voidMediaType.sortByQualityValue(List<MediaType> mediaTypes) Sorts the given list ofMediaTypeobjects by quality value.static voidMediaType.sortBySpecificity(List<MediaType> mediaTypes) Sorts the given list ofMediaTypeobjects by specificity.static voidMediaType.sortBySpecificityAndQuality(List<MediaType> mediaTypes) Sorts the given list ofMediaTypeobjects by specificity as the primary criteria and quality value the secondary.static StringMediaType.toString(Collection<MediaType> mediaTypes) Return a string representation of the given list ofMediaTypeobjects.参数类型为MediaType的cn.taketoday.http中的构造器限定符构造器说明Copy-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. -
cn.taketoday.http.client中MediaType的使用
参数类型为MediaType的cn.taketoday.http.client中的方法修饰符和类型方法说明MultipartBodyBuilder.DefaultPartBuilder.contentType(MediaType contentType) MultipartBodyBuilder.PartBuilder.contentType(MediaType contentType) Set the media type of the part.Variant ofMultipartBodyBuilder.part(String, Object)that also accepts a MediaType. -
cn.taketoday.http.codec中MediaType的使用
声明为MediaType的cn.taketoday.http.codec中的字段修饰符和类型字段说明private static final MediaTypeFormHttpMessageWriter.DEFAULT_FORM_DATA_MEDIA_TYPEprivate static final MediaTypeServerSentEventHttpMessageWriter.DEFAULT_MEDIA_TYPEprivate final MediaTypeEncoderHttpMessageWriter.defaultMediaType类型参数类型为MediaType的cn.taketoday.http.codec中的字段修饰符和类型字段说明FormHttpMessageWriter.MEDIA_TYPESDecoderHttpMessageReader.mediaTypesEncoderHttpMessageWriter.mediaTypesResourceHttpMessageWriter.mediaTypesServerSentEventHttpMessageWriter.WRITABLE_MEDIA_TYPES修饰符和类型方法说明private static MediaTypeEncoderHttpMessageWriter.addDefaultCharset(MediaType main, MediaType defaultType) protected MediaTypeDecoderHttpMessageReader.getContentType(HttpMessage inputMessage) Determine the Content-Type of the HTTP message based on the "Content-Type" header or otherwise default toAPPLICATION_OCTET_STREAM.protected MediaTypeFormHttpMessageWriter.getMediaType(MediaType mediaType) private static MediaTypeResourceHttpMessageWriter.getResourceMediaType(MediaType mediaType, cn.taketoday.core.io.Resource resource, Map<String, Object> hints) private static MediaTypeEncoderHttpMessageWriter.initDefaultMediaType(List<MediaType> mediaTypes) private MediaTypeEncoderHttpMessageWriter.updateContentType(ReactiveHttpOutputMessage message, MediaType mediaType) 返回变量类型为MediaType的类型的cn.taketoday.http.codec中的方法修饰符和类型方法说明DecoderHttpMessageReader.getReadableMediaTypes()DecoderHttpMessageReader.getReadableMediaTypes(cn.taketoday.core.ResolvableType elementType) FormHttpMessageReader.getReadableMediaTypes()HttpMessageReader.getReadableMediaTypes()Return the list of media types supported by this reader.HttpMessageReader.getReadableMediaTypes(cn.taketoday.core.ResolvableType elementType) Return the list of media types supported by this Reader for the given type of element.ServerSentEventHttpMessageReader.getReadableMediaTypes()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(cn.taketoday.core.ResolvableType elementType) FormHttpMessageWriter.getWritableMediaTypes()HttpMessageWriter.getWritableMediaTypes()Return the list of media types supported by this Writer.HttpMessageWriter.getWritableMediaTypes(cn.taketoday.core.ResolvableType elementType) Return the list of media types supported by this Writer for the given type of element.ResourceHttpMessageWriter.getWritableMediaTypes()ServerSentEventHttpMessageWriter.getWritableMediaTypes()参数类型为MediaType的cn.taketoday.http.codec中的方法修饰符和类型方法说明private static MediaTypeEncoderHttpMessageWriter.addDefaultCharset(MediaType main, MediaType defaultType) reactor.core.publisher.Mono<Void>ResourceHttpMessageWriter.addDefaultHeaders(ReactiveHttpOutputMessage message, cn.taketoday.core.io.Resource resource, MediaType contentType, Map<String, Object> hints) Adds the default headers for the given resource to the given message.booleanbooleanbooleanWhether the given object type is supported by this reader.booleanServerSentEventHttpMessageReader.canRead(cn.taketoday.core.ResolvableType elementType, MediaType mediaType) booleanEncoderHttpMessageWriter.canWrite(cn.taketoday.core.ResolvableType elementType, MediaType mediaType) booleanbooleanWhether the given object type is supported by this writer.booleanResourceHttpMessageWriter.canWrite(cn.taketoday.core.ResolvableType elementType, MediaType mediaType) booleanServerSentEventHttpMessageWriter.canWrite(cn.taketoday.core.ResolvableType elementType, MediaType mediaType) private reactor.core.publisher.Flux<org.reactivestreams.Publisher<cn.taketoday.core.io.buffer.DataBuffer>>ServerSentEventHttpMessageWriter.encode(org.reactivestreams.Publisher<?> input, cn.taketoday.core.ResolvableType elementType, MediaType mediaType, cn.taketoday.core.io.buffer.DataBufferFactory factory, Map<String, Object> hints) private reactor.core.publisher.Mono<Void>ResourceHttpMessageWriter.encodeAndWriteRegions(org.reactivestreams.Publisher<? extends cn.taketoday.core.io.ResourceRegion> publisher, MediaType mediaType, ReactiveHttpOutputMessage message, Map<String, Object> hints) private <T> reactor.core.publisher.Flux<cn.taketoday.core.io.buffer.DataBuffer>ServerSentEventHttpMessageWriter.encodeEvent(StringBuilder eventContent, T data, cn.taketoday.core.ResolvableType dataType, MediaType mediaType, cn.taketoday.core.io.buffer.DataBufferFactory factory, Map<String, Object> hints) private cn.taketoday.core.io.buffer.DataBufferServerSentEventHttpMessageWriter.encodeText(CharSequence text, MediaType mediaType, cn.taketoday.core.io.buffer.DataBufferFactory bufferFactory) HttpMessageEncoder.getEncodeHints(cn.taketoday.core.ResolvableType actualType, cn.taketoday.core.ResolvableType elementType, MediaType mediaType, ServerHttpRequest request, ServerHttpResponse response) Get decoding hints based on the server request or annotations on the target controller method parameter.ServerSentEventHttpMessageWriter.getEncodeHints(cn.taketoday.core.ResolvableType actualType, cn.taketoday.core.ResolvableType elementType, MediaType mediaType, ServerHttpRequest request, ServerHttpResponse response) protected MediaTypeFormHttpMessageWriter.getMediaType(MediaType mediaType) private CharsetFormHttpMessageReader.getMediaTypeCharset(MediaType mediaType) private static MediaTypeResourceHttpMessageWriter.getResourceMediaType(MediaType mediaType, cn.taketoday.core.io.Resource resource, Map<String, Object> hints) EncoderHttpMessageWriter.getWriteHints(cn.taketoday.core.ResolvableType streamType, cn.taketoday.core.ResolvableType elementType, MediaType mediaType, ServerHttpRequest request, ServerHttpResponse response) Get additional hints for encoding for example based on the server request or annotations from controller method parameters.private booleanEncoderHttpMessageWriter.isStreamingMediaType(MediaType mediaType) private booleanEncoderHttpMessageWriter.matchParameters(MediaType streamingMediaType, MediaType mediaType) private MediaTypeEncoderHttpMessageWriter.updateContentType(ReactiveHttpOutputMessage message, MediaType mediaType) private static booleanEncoderHttpMessageWriter.useFallback(MediaType main, MediaType fallback) reactor.core.publisher.Mono<Void>EncoderHttpMessageWriter.write(org.reactivestreams.Publisher<? extends T> inputStream, cn.taketoday.core.ResolvableType actualType, cn.taketoday.core.ResolvableType elementType, MediaType mediaType, ServerHttpRequest request, ServerHttpResponse response, Map<String, Object> hints) reactor.core.publisher.Mono<Void>EncoderHttpMessageWriter.write(org.reactivestreams.Publisher<? extends T> inputStream, cn.taketoday.core.ResolvableType elementType, MediaType mediaType, ReactiveHttpOutputMessage message, Map<String, Object> hints) reactor.core.publisher.Mono<Void>FormHttpMessageWriter.write(org.reactivestreams.Publisher<? extends cn.taketoday.util.MultiValueMap<String, String>> inputStream, cn.taketoday.core.ResolvableType elementType, MediaType mediaType, ReactiveHttpOutputMessage message, Map<String, Object> hints) default reactor.core.publisher.Mono<Void>HttpMessageWriter.write(org.reactivestreams.Publisher<? extends T> inputStream, cn.taketoday.core.ResolvableType actualType, cn.taketoday.core.ResolvableType elementType, 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(org.reactivestreams.Publisher<? extends T> inputStream, cn.taketoday.core.ResolvableType elementType, MediaType mediaType, ReactiveHttpOutputMessage message, Map<String, Object> hints) Write an given stream of object to the output message.reactor.core.publisher.Mono<Void>ResourceHttpMessageWriter.write(org.reactivestreams.Publisher<? extends cn.taketoday.core.io.Resource> inputStream, cn.taketoday.core.ResolvableType actualType, cn.taketoday.core.ResolvableType elementType, MediaType mediaType, ServerHttpRequest request, ServerHttpResponse response, Map<String, Object> hints) reactor.core.publisher.Mono<Void>ResourceHttpMessageWriter.write(org.reactivestreams.Publisher<? extends cn.taketoday.core.io.Resource> inputStream, cn.taketoday.core.ResolvableType elementType, MediaType mediaType, ReactiveHttpOutputMessage message, Map<String, Object> hints) reactor.core.publisher.Mono<Void>ServerSentEventHttpMessageWriter.write(org.reactivestreams.Publisher<?> input, cn.taketoday.core.ResolvableType actualType, cn.taketoday.core.ResolvableType elementType, MediaType mediaType, ServerHttpRequest request, ServerHttpResponse response, Map<String, Object> hints) reactor.core.publisher.Mono<Void>ServerSentEventHttpMessageWriter.write(org.reactivestreams.Publisher<?> input, cn.taketoday.core.ResolvableType elementType, MediaType mediaType, ReactiveHttpOutputMessage message, Map<String, Object> hints) private reactor.core.publisher.Mono<Void>ResourceHttpMessageWriter.writeResource(cn.taketoday.core.io.Resource resource, cn.taketoday.core.ResolvableType type, MediaType mediaType, ReactiveHttpOutputMessage message, Map<String, Object> hints) 类型变量类型为MediaType的cn.taketoday.http.codec中的方法参数修饰符和类型方法说明private static MediaTypeEncoderHttpMessageWriter.initDefaultMediaType(List<MediaType> mediaTypes) -
cn.taketoday.http.codec.json中MediaType的使用
类型参数类型为MediaType的cn.taketoday.http.codec.json中的字段返回变量类型为MediaType的类型的cn.taketoday.http.codec.json中的方法参数类型为MediaType的cn.taketoday.http.codec.json中的方法修饰符和类型方法说明AbstractJackson2Encoder.getEncodeHints(cn.taketoday.core.ResolvableType actualType, cn.taketoday.core.ResolvableType elementType, MediaType mediaType, ServerHttpRequest request, ServerHttpResponse response) 类型变量类型为MediaType的cn.taketoday.http.codec.json中的方法参数修饰符和类型方法说明voidAbstractJackson2Encoder.setStreamingMediaTypes(List<MediaType> mediaTypes) Configure "streaming" media types for which flushing should be performed automatically vs at the end of the stream. -
cn.taketoday.http.codec.multipart中MediaType的使用
类型参数类型为MediaType的cn.taketoday.http.codec.multipart中的字段修饰符和类型方法说明protected MediaTypeMultipartWriterSupport.getMultipartMediaType(MediaType mediaType, byte[] boundary) Prepare theMediaTypeto use by adding "boundary" and "charset" parameters to the givenmediaTypeor "mulitpart/form-data" otherwise by default.返回变量类型为MediaType的类型的cn.taketoday.http.codec.multipart中的方法修饰符和类型方法说明DefaultPartHttpMessageReader.getReadableMediaTypes()MultipartHttpMessageReader.getReadableMediaTypes()PartEventHttpMessageReader.getReadableMediaTypes()MultipartWriterSupport.getWritableMediaTypes()MultipartHttpMessageWriter.initMediaTypes(HttpMessageWriter<?> formWriter) 修饰符和类型方法说明booleanDefaultPartHttpMessageReader.canRead(cn.taketoday.core.ResolvableType elementType, MediaType mediaType) booleanMultipartHttpMessageReader.canRead(cn.taketoday.core.ResolvableType elementType, MediaType mediaType) booleanPartEventHttpMessageReader.canRead(cn.taketoday.core.ResolvableType elementType, MediaType mediaType) booleanMultipartHttpMessageWriter.canWrite(cn.taketoday.core.ResolvableType elementType, MediaType mediaType) booleanPartEventHttpMessageWriter.canWrite(cn.taketoday.core.ResolvableType elementType, MediaType mediaType) booleanstatic reactor.core.publisher.Flux<FilePartEvent>FilePartEvent.create(String partName, String filename, MediaType contentType, reactor.core.publisher.Flux<cn.taketoday.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<cn.taketoday.core.io.buffer.DataBuffer> contents, Consumer<HttpHeaders> headersConsumer) Creates a stream ofFilePartEventobjects based on the given name, FilePartEvent.filename(), content-type, and contents.protected MediaTypeMultipartWriterSupport.getMultipartMediaType(MediaType mediaType, byte[] boundary) Prepare theMediaTypeto use by adding "boundary" and "charset" parameters to the givenmediaTypeor "mulitpart/form-data" otherwise by default.private booleanMultipartHttpMessageWriter.isMultipart(cn.taketoday.util.MultiValueMap<String, ?> map, MediaType contentType) reactor.core.publisher.Mono<Void>MultipartHttpMessageWriter.write(org.reactivestreams.Publisher<? extends cn.taketoday.util.MultiValueMap<String, ?>> inputStream, cn.taketoday.core.ResolvableType elementType, MediaType mediaType, ReactiveHttpOutputMessage outputMessage, Map<String, Object> hints) reactor.core.publisher.Mono<Void>PartEventHttpMessageWriter.write(org.reactivestreams.Publisher<? extends PartEvent> partDataStream, cn.taketoday.core.ResolvableType elementType, MediaType mediaType, ReactiveHttpOutputMessage outputMessage, Map<String, Object> hints) reactor.core.publisher.Mono<Void>PartHttpMessageWriter.write(org.reactivestreams.Publisher<? extends Part> parts, cn.taketoday.core.ResolvableType elementType, MediaType mediaType, ReactiveHttpOutputMessage outputMessage, Map<String, Object> hints) private reactor.core.publisher.Mono<Void>MultipartHttpMessageWriter.writeMultipart(cn.taketoday.util.MultiValueMap<String, ?> map, ReactiveHttpOutputMessage outputMessage, MediaType mediaType, Map<String, Object> hints) 类型变量类型为MediaType的cn.taketoday.http.codec.multipart中的构造器参数限定符构造器说明protectedMultipartWriterSupport(List<MediaType> supportedMediaTypes) Constructor with the list of supported media types. -
cn.taketoday.http.codec.protobuf中MediaType的使用
类型参数类型为MediaType的cn.taketoday.http.codec.protobuf中的字段返回变量类型为MediaType的类型的cn.taketoday.http.codec.protobuf中的方法 -
cn.taketoday.http.converter中MediaType的使用
修饰符和类型字段说明private static final MediaTypeStringHttpMessageConverter.APPLICATION_PLUS_JSONprivate static final MediaTypeFormHttpMessageConverter.DEFAULT_FORM_DATA_MEDIA_TYPEprivate MediaTypeBufferedImageHttpMessageConverter.defaultContentType类型参数类型为MediaType的cn.taketoday.http.converter中的字段修饰符和类型字段说明BufferedImageHttpMessageConverter.readableMediaTypesAbstractHttpMessageConverter.supportedMediaTypesFormHttpMessageConverter.supportedMediaTypes修饰符和类型方法说明private MediaTypeBufferedImageHttpMessageConverter.getContentType(MediaType contentType) protected MediaTypeAbstractHttpMessageConverter.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(cn.taketoday.core.io.Resource resource) protected MediaTypeResourceRegionHttpMessageConverter.getDefaultContentType(Object object) protected MediaTypeFormHttpMessageConverter.getFormContentType(MediaType contentType) Return the content type used to write forms, given the preferred content type.返回变量类型为MediaType的类型的cn.taketoday.http.converter中的方法修饰符和类型方法说明AbstractHttpMessageConverter.getSupportedMediaTypes()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.参数类型为MediaType的cn.taketoday.http.converter中的方法修饰符和类型方法说明voidAbstractHttpMessageConverter.addDefaultHeaders(HttpHeaders headers, T t, MediaType contentType) Add default headers to the output message.voidResourceHttpMessageConverter.addDefaultHeaders(HttpOutputMessage message, cn.taketoday.core.io.Resource resource, MediaType contentType) Adds the default headers for the given resource to the given message.voidStringHttpMessageConverter.addDefaultHeaders(HttpHeaders headers, String s, MediaType type) voidFormHttpMessageConverter.addSupportedMediaTypes(MediaType... supportedMediaTypes) AddMediaTypeobjects to be supported by this converter.booleanprotected booleanbooleanThis implementation checks if the given class is supported, and if the supported media types include the given media type.booleanbooleanbooleanIndicates whether the given type can be read by this converter.booleanIndicates whether the given class can be read by this converter.booleanbooleanbooleanbooleanprotected booleanReturnstrueif the given media type includes any of the supported media types.booleanbooleanbooleanbooleanIndicates whether the given class can be written by this converter.booleanIndicates whether the given class can be written by this converter.booleanbooleanbooleanprotected LongAbstractHttpMessageConverter.getContentLength(T t, MediaType contentType) Returns the content length for the given type.protected LongByteArrayHttpMessageConverter.getContentLength(byte[] bytes, MediaType contentType) protected LongObjectToStringHttpMessageConverter.getContentLength(Object obj, MediaType contentType) protected LongResourceHttpMessageConverter.getContentLength(cn.taketoday.core.io.Resource resource, MediaType contentType) protected LongStringHttpMessageConverter.getContentLength(String str, MediaType contentType) private MediaTypeBufferedImageHttpMessageConverter.getContentType(MediaType contentType) private CharsetStringHttpMessageConverter.getContentTypeCharset(MediaType contentType) protected MediaTypeFormHttpMessageConverter.getFormContentType(MediaType contentType) Return the content type used to write forms, given the preferred content type.private booleanFormHttpMessageConverter.isMultipart(cn.taketoday.util.MultiValueMap<String, ?> map, MediaType contentType) private booleanBufferedImageHttpMessageConverter.isReadable(MediaType mediaType) private booleanBufferedImageHttpMessageConverter.isWritable(MediaType mediaType) voidBufferedImageHttpMessageConverter.setDefaultContentType(MediaType defaultContentType) Sets the defaultContent-Typeto be used for writing.final voidAbstractGenericHttpMessageConverter.write(T t, Type type, MediaType contentType, HttpOutputMessage outputMessage) This implementation sets the default headers by callingAbstractHttpMessageConverter.addDefaultHeaders(cn.taketoday.http.HttpHeaders, T, cn.taketoday.http.MediaType), and then callsAbstractGenericHttpMessageConverter.writeInternal(T, cn.taketoday.http.HttpOutputMessage).final voidAbstractHttpMessageConverter.write(T t, MediaType contentType, HttpOutputMessage outputMessage) This implementation sets the default headers by callingAbstractHttpMessageConverter.addDefaultHeaders(cn.taketoday.http.HttpHeaders, T, cn.taketoday.http.MediaType), and then callsAbstractHttpMessageConverter.writeInternal(T, cn.taketoday.http.HttpOutputMessage).voidBufferedImageHttpMessageConverter.write(BufferedImage image, MediaType contentType, HttpOutputMessage outputMessage) voidFormHttpMessageConverter.write(cn.taketoday.util.MultiValueMap<String, ?> map, MediaType contentType, HttpOutputMessage outputMessage) voidGenericHttpMessageConverter.write(T t, Type type, MediaType contentType, HttpOutputMessage outputMessage) Write an given object to the given output message.voidHttpMessageConverter.write(T t, MediaType contentType, HttpOutputMessage outputMessage) Write an given object to the given output message.private voidFormHttpMessageConverter.writeForm(cn.taketoday.util.MultiValueMap<String, Object> formData, MediaType contentType, HttpOutputMessage outputMessage) private voidBufferedImageHttpMessageConverter.writeInternal(BufferedImage image, MediaType contentType, OutputStream body) private voidFormHttpMessageConverter.writeMultipart(cn.taketoday.util.MultiValueMap<String, Object> parts, MediaType contentType, HttpOutputMessage outputMessage) 类型变量类型为MediaType的cn.taketoday.http.converter中的方法参数修饰符和类型方法说明voidAbstractHttpMessageConverter.setSupportedMediaTypes(List<MediaType> supportedMediaTypes) Set the list ofMediaTypeobjects supported by this converter.voidFormHttpMessageConverter.setSupportedMediaTypes(List<MediaType> supportedMediaTypes) Set the list ofMediaTypeobjects supported by this converter.参数类型为MediaType的cn.taketoday.http.converter中的构造器限定符构造器说明protectedAbstractGenericHttpMessageConverter(MediaType supportedMediaType) Construct anAbstractGenericHttpMessageConverterwith one supported media type.protectedAbstractGenericHttpMessageConverter(MediaType... supportedMediaTypes) Construct anAbstractGenericHttpMessageConverterwith multiple supported media type.protectedAbstractHttpMessageConverter(MediaType supportedMediaType) Construct anAbstractHttpMessageConverterwith one supported media type.protectedAbstractHttpMessageConverter(MediaType... supportedMediaTypes) Construct anAbstractHttpMessageConverterwith multiple supported media types.protectedAbstractHttpMessageConverter(Charset defaultCharset, MediaType... supportedMediaTypes) Construct anAbstractHttpMessageConverterwith a default charset and multiple supported media types. -
cn.taketoday.http.converter.feed中MediaType的使用
参数类型为MediaType的cn.taketoday.http.converter.feed中的构造器 -
cn.taketoday.http.converter.json中MediaType的使用
类型参数类型为MediaType的cn.taketoday.http.converter.json中的字段修饰符和类型字段说明private Map<Class<?>,Map<MediaType, ObjectMapper>> AbstractJackson2HttpMessageConverter.objectMapperRegistrationsMappingJackson2HttpMessageConverter.problemDetailMediaTypes修饰符和类型方法说明protected MediaTypeAbstractJackson2HttpMessageConverter.getDefaultContentType(Object object) 返回变量类型为MediaType的类型的cn.taketoday.http.converter.json中的方法修饰符和类型方法说明AbstractJackson2HttpMessageConverter.getMediaTypesForProblemDetail()Return the supported media type(s) forProblemDetail.MappingJackson2HttpMessageConverter.getMediaTypesForProblemDetail()private Map<Class<?>,Map<MediaType, ObjectMapper>> AbstractJackson2HttpMessageConverter.getObjectMapperRegistrations()AbstractJackson2HttpMessageConverter.getObjectMappersForType(Class<?> clazz) Return ObjectMapper registrations for the given class, if any.AbstractJackson2HttpMessageConverter.getSupportedMediaTypes(Class<?> clazz) 修饰符和类型方法说明booleanbooleanbooleanprotected ObjectWriterAbstractJackson2HttpMessageConverter.customizeWriter(ObjectWriter writer, JavaType javaType, MediaType contentType) Subclasses can use this method to customizeObjectWriterused for writing values.protected CharsetAbstractJackson2HttpMessageConverter.getCharset(MediaType contentType) Determine the charset to use for JSON input.protected LongAbstractJackson2HttpMessageConverter.getContentLength(Object object, MediaType contentType) protected JsonEncodingAbstractJackson2HttpMessageConverter.getJsonEncoding(MediaType contentType) Determine the JSON encoding to use for the given content type.private ObjectMapperAbstractJackson2HttpMessageConverter.selectObjectMapper(Class<?> targetType, MediaType targetMediaType) Select an ObjectMapper to use, either the main ObjectMapper or another if the handling for the given Class has been customized throughAbstractJackson2HttpMessageConverter.registerObjectMappersForType(Class, Consumer).类型变量类型为MediaType的cn.taketoday.http.converter.json中的方法参数修饰符和类型方法说明voidAbstractJackson2HttpMessageConverter.registerObjectMappersForType(Class<?> clazz, Consumer<Map<MediaType, ObjectMapper>> registrar) Configure theObjectMapperinstances to use for the givenClass.参数类型为MediaType的cn.taketoday.http.converter.json中的构造器限定符构造器说明protectedAbstractJackson2HttpMessageConverter(ObjectMapper objectMapper, MediaType supportedMediaType) protectedAbstractJackson2HttpMessageConverter(ObjectMapper objectMapper, MediaType... supportedMediaTypes) -
cn.taketoday.http.converter.protobuf中MediaType的使用
修饰符和类型字段说明static final MediaTypeProtobufHttpMessageConverter.PROTOBUFThe media-type for protobufapplication/x-protobuf.修饰符和类型方法说明protected MediaTypeProtobufHttpMessageConverter.getDefaultContentType(com.google.protobuf.Message message) ProtobufHttpMessageConverter.ProtobufFormatSupport.supportedMediaTypes()ProtobufHttpMessageConverter.ProtobufJavaFormatSupport.supportedMediaTypes()ProtobufHttpMessageConverter.ProtobufJavaUtilSupport.supportedMediaTypes()修饰符和类型方法说明protected booleanvoidProtobufHttpMessageConverter.ProtobufFormatSupport.merge(InputStream input, Charset charset, MediaType contentType, com.google.protobuf.ExtensionRegistry extensionRegistry, com.google.protobuf.Message.Builder builder) voidProtobufHttpMessageConverter.ProtobufJavaFormatSupport.merge(InputStream input, Charset charset, MediaType contentType, com.google.protobuf.ExtensionRegistry extensionRegistry, com.google.protobuf.Message.Builder builder) voidProtobufHttpMessageConverter.ProtobufJavaUtilSupport.merge(InputStream input, Charset charset, MediaType contentType, com.google.protobuf.ExtensionRegistry extensionRegistry, com.google.protobuf.Message.Builder builder) voidProtobufHttpMessageConverter.ProtobufFormatSupport.print(com.google.protobuf.Message message, OutputStream output, MediaType contentType, Charset charset) voidProtobufHttpMessageConverter.ProtobufJavaFormatSupport.print(com.google.protobuf.Message message, OutputStream output, MediaType contentType, Charset charset) voidProtobufHttpMessageConverter.ProtobufJavaUtilSupport.print(com.google.protobuf.Message message, OutputStream output, MediaType contentType, Charset charset) booleanProtobufHttpMessageConverter.ProtobufFormatSupport.supportsWriteOnly(MediaType mediaType) booleanProtobufHttpMessageConverter.ProtobufJavaFormatSupport.supportsWriteOnly(MediaType mediaType) booleanProtobufHttpMessageConverter.ProtobufJavaUtilSupport.supportsWriteOnly(MediaType mediaType) -
cn.taketoday.http.converter.xml中MediaType的使用
类型参数类型为MediaType的cn.taketoday.http.converter.xml中的字段返回变量类型为MediaType的类型的cn.taketoday.http.converter.xml中的方法参数类型为MediaType的cn.taketoday.http.converter.xml中的方法修饰符和类型方法说明booleanAlways returnsfalsesince Jaxb2CollectionHttpMessageConverter required generic type information in order to read a Collection.booleanIndicates whether the given type can be read by this converter.booleanbooleanbooleanAlways returnsfalsesince Jaxb2CollectionHttpMessageConverter does not convert collections to XML.booleanAlways returnsfalsesince Jaxb2CollectionHttpMessageConverter does not convert collections to XML.booleanbooleanprotected LongSourceHttpMessageConverter.getContentLength(T t, MediaType contentType) private voidJaxb2RootElementHttpMessageConverter.setCharset(MediaType contentType, Marshaller marshaller) voidJaxb2CollectionHttpMessageConverter.write(T t, Type type, MediaType contentType, HttpOutputMessage outputMessage) -
cn.taketoday.web中MediaType的使用
声明为MediaType的cn.taketoday.web中的字段修饰符和类型字段说明private final MediaTypeHttpMediaTypeNotSupportedException.contentTypeprivate final MediaTypeUnsupportedMediaTypeStatusException.contentTypeprivate MediaType[]HandlerMatchingMetadata.producibleMediaTypes类型参数类型为MediaType的cn.taketoday.web中的字段修饰符和类型字段说明HttpMediaTypeException.supportedMediaTypesNotAcceptableStatusException.supportedMediaTypesUnsupportedMediaTypeStatusException.supportedMediaTypes返回MediaType的cn.taketoday.web中的方法修饰符和类型方法说明HttpMediaTypeNotSupportedException.getContentType()Return the HTTP request content type method that caused the failure.UnsupportedMediaTypeStatusException.getContentType()Return the request Content-Type header if it was parsed successfully, ornullotherwise.HandlerMatchingMetadata.getProducibleMediaTypes()返回变量类型为MediaType的类型的cn.taketoday.web中的方法修饰符和类型方法说明HttpMediaTypeException.getSupportedMediaTypes()Return the list of supported media types.NotAcceptableStatusException.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.参数类型为MediaType的cn.taketoday.web中的方法修饰符和类型方法说明voidDecoratingRequestContext.setContentType(MediaType contentType) voidRequestContext.setContentType(MediaType contentType) Sets the content type of the response being sent to the client, if the response has not been committed yet.voidHandlerMatchingMetadata.setProducibleMediaTypes(MediaType[] producibleMediaTypes) 参数类型为MediaType的cn.taketoday.web中的构造器限定符构造器说明HttpMediaTypeNotSupportedException(MediaType contentType, List<MediaType> mediaTypes) Create a new HttpMediaTypeNotSupportedException.HttpMediaTypeNotSupportedException(MediaType contentType, List<MediaType> mediaTypes, HttpMethod httpMethod) Create a new HttpMediaTypeNotSupportedException.HttpMediaTypeNotSupportedException(MediaType contentType, List<MediaType> supportedMediaTypes, HttpMethod httpMethod, String message) Create a new HttpMediaTypeNotSupportedException.UnsupportedMediaTypeStatusException(MediaType contentType, List<MediaType> supportedTypes) Constructor for when the Content-Type can be parsed but is not supported.UnsupportedMediaTypeStatusException(MediaType contentType, List<MediaType> supportedTypes, cn.taketoday.core.ResolvableType bodyType) Constructor for when trying to encode from or decode to a specific Java type.UnsupportedMediaTypeStatusException(MediaType contentType, List<MediaType> supportedTypes, cn.taketoday.core.ResolvableType bodyType, HttpMethod method) Constructor for when trying to encode from or decode to a specific Java type.UnsupportedMediaTypeStatusException(MediaType contentType, List<MediaType> supportedTypes, HttpMethod method) Constructor that provides the HTTP method.类型变量类型为MediaType的cn.taketoday.web中的构造器参数限定符构造器说明protectedHttpMediaTypeException(String message, List<MediaType> supportedMediaTypes) Create a new HttpMediaTypeException with a list of supported media types.HttpMediaTypeNotAcceptableException(List<MediaType> mediaTypes) Create a new HttpMediaTypeNotSupportedException.HttpMediaTypeNotSupportedException(MediaType contentType, List<MediaType> mediaTypes) Create a new HttpMediaTypeNotSupportedException.HttpMediaTypeNotSupportedException(MediaType contentType, List<MediaType> mediaTypes, HttpMethod httpMethod) Create a new HttpMediaTypeNotSupportedException.HttpMediaTypeNotSupportedException(MediaType contentType, List<MediaType> supportedMediaTypes, HttpMethod httpMethod, String message) Create a new HttpMediaTypeNotSupportedException.HttpMediaTypeNotSupportedException(String message, List<MediaType> mediaTypes) Create a new HttpMediaTypeNotSupportedException.NotAcceptableStatusException(List<MediaType> mediaTypes) Constructor for when the requested Content-Type is not supported.UnsupportedMediaTypeStatusException(MediaType contentType, List<MediaType> supportedTypes) Constructor for when the Content-Type can be parsed but is not supported.UnsupportedMediaTypeStatusException(MediaType contentType, List<MediaType> supportedTypes, cn.taketoday.core.ResolvableType bodyType) Constructor for when trying to encode from or decode to a specific Java type.UnsupportedMediaTypeStatusException(MediaType contentType, List<MediaType> supportedTypes, cn.taketoday.core.ResolvableType bodyType, HttpMethod method) Constructor for when trying to encode from or decode to a specific Java type.UnsupportedMediaTypeStatusException(MediaType contentType, List<MediaType> supportedTypes, HttpMethod method) Constructor that provides the HTTP method.UnsupportedMediaTypeStatusException(String reason, List<MediaType> supportedTypes) Constructor for when the specified Content-Type is invalid. -
cn.taketoday.web.accept中MediaType的使用
类型参数类型为MediaType的cn.taketoday.web.accept中的字段修饰符和类型字段说明FixedContentNegotiationStrategy.contentTypesprivate final ConcurrentHashMap<MediaType,List<String>> MappingMediaTypeFileExtensionResolver.fileExtensionsContentNegotiationStrategy.MEDIA_TYPE_ALL_LISTA singleton list withALLthat is returned fromContentNegotiationStrategy.resolveMediaTypes(cn.taketoday.web.RequestContext)when no specific media types are requested.ContentNegotiationManagerFactoryBean.mediaTypesprivate final ConcurrentHashMap<String,MediaType> MappingMediaTypeFileExtensionResolver.mediaTypes修饰符和类型方法说明PathExtensionContentNegotiationStrategy.getMediaTypeForResource(cn.taketoday.core.io.Resource resource) A public method exposing the knowledge of the path extension strategy to resolve file extensions to aMediaTypein this case for a givenResource.protected MediaTypeAbstractMappingContentNegotiationStrategy.handleNoMatch(RequestContext request, String key) Override to provide handling when a key is not resolved via.protected MediaTypePathExtensionContentNegotiationStrategy.handleNoMatch(RequestContext request, String extension) Resolve file extension viaServletContext.getMimeType(String)and also delegate to base class for a potentialMediaTypeFactorylookup.protected MediaTypeMappingMediaTypeFileExtensionResolver.lookupMediaType(String extension) Use this method for a reverse lookup from extension to MediaType.返回变量类型为MediaType的类型的cn.taketoday.web.accept中的方法修饰符和类型方法说明MappingMediaTypeFileExtensionResolver.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(RequestContext webRequest, String key) An alternative toAbstractMappingContentNegotiationStrategy.resolveMediaTypes(RequestContext)that accepts an already extracted key.AbstractMappingContentNegotiationStrategy.resolveMediaTypes(RequestContext context) ContentNegotiationManager.resolveMediaTypes(RequestContext request) ContentNegotiationStrategy.resolveMediaTypes(RequestContext context) Resolve the given request to a list of media types.FixedContentNegotiationStrategy.resolveMediaTypes(RequestContext request) HeaderContentNegotiationStrategy.resolveMediaTypes(RequestContext request) Resolve the given request to a list of media types.参数类型为MediaType的cn.taketoday.web.accept中的方法修饰符和类型方法说明private voidMappingMediaTypeFileExtensionResolver.addFileExtension(MediaType mediaType, String extension) protected voidMappingMediaTypeFileExtensionResolver.addMapping(String extension, MediaType mediaType) Map an extension to a MediaType.voidContentNegotiationManagerFactoryBean.addMediaType(String key, MediaType mediaType) An alternative toContentNegotiationManagerFactoryBean.setMediaTypes(java.util.Properties)for programmatic registrations.protected voidAbstractMappingContentNegotiationStrategy.handleMatch(String key, MediaType mediaType) Override to provide handling when a key is successfully resolved viaMappingMediaTypeFileExtensionResolver.lookupMediaType(java.lang.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.类型变量类型为MediaType的cn.taketoday.web.accept中的方法参数修饰符和类型方法说明voidContentNegotiationManagerFactoryBean.addMediaTypes(Map<String, MediaType> mediaTypes) An alternative toContentNegotiationManagerFactoryBean.setMediaTypes(java.util.Properties)for programmatic registrations.voidContentNegotiationManagerFactoryBean.setDefaultContentTypes(List<MediaType> contentTypes) Set the default content types to use when no content type is requested.参数类型为MediaType的cn.taketoday.web.accept中的构造器限定符构造器说明FixedContentNegotiationStrategy(MediaType contentType) Constructor with a single defaultMediaType.类型变量类型为MediaType的cn.taketoday.web.accept中的构造器参数限定符构造器说明AbstractMappingContentNegotiationStrategy(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(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.PathExtensionContentNegotiationStrategy(Object servletContext, Map<String, MediaType> mediaTypes) Create an instance with the given map of file extensions and media types.PathExtensionContentNegotiationStrategy(Map<String, MediaType> mediaTypes) Create an instance with the given map of file extensions and media types. -
cn.taketoday.web.bind.resolver中MediaType的使用
类型参数类型为MediaType的cn.taketoday.web.bind.resolver中的字段修饰符和类型字段说明AbstractMessageConverterMethodProcessor.ALL_APPLICATION_MEDIA_TYPESAbstractMessageConverterMethodProcessor.problemMediaTypes修饰符和类型方法说明private MediaTypeAbstractMessageConverterMethodProcessor.getMostSpecificMediaType(MediaType acceptType, MediaType produceType) Return the more specific of the acceptable and the producible media types with the q-value of the former.private MediaTypeAbstractMessageConverterMethodProcessor.resolveMediaType(RequestContext request, String extension) 返回变量类型为MediaType的类型的cn.taketoday.web.bind.resolver中的方法修饰符和类型方法说明AbstractMessageConverterMethodProcessor.getAcceptableMediaTypes(RequestContext request) AbstractMessageConverterMethodProcessor.getProducibleMediaTypes(RequestContext request, Class<?> valueClass) Returns the media types that can be produced.AbstractMessageConverterMethodProcessor.getProducibleMediaTypes(RequestContext request, Class<?> valueClass, Type targetType) Returns the media types that can be produced.AbstractMessageConverterMethodArgumentResolver.getSupportedMediaTypes(Class<?> clazz) Return the media types supported by all provided message converters sorted by specificity viaMimeTypeUtils.sortBySpecificity(List).参数类型为MediaType的cn.taketoday.web.bind.resolver中的方法修饰符和类型方法说明RequestResponseBodyAdviceChain.beforeBodyWrite(Object body, cn.taketoday.core.MethodParameter returnType, MediaType contentType, HttpMessageConverter<?> converter, RequestContext context) private MediaTypeAbstractMessageConverterMethodProcessor.getMostSpecificMediaType(MediaType acceptType, MediaType produceType) Return the more specific of the acceptable and the producible media types with the q-value of the former.private booleanAbstractMessageConverterMethodProcessor.safeMediaType(MediaType mediaType) 类型变量类型为MediaType的cn.taketoday.web.bind.resolver中的方法参数 -
cn.taketoday.web.client中MediaType的使用
声明为MediaType的cn.taketoday.web.client中的字段修饰符和类型方法说明private MediaTypeDefaultRestClient.DefaultResponseSpec.getContentType()protected MediaTypeHttpMessageConverterExtractor.getContentType(ClientHttpResponse response) Determine the Content-Type of the response based on the "Content-Type" header or otherwise default toAPPLICATION_OCTET_STREAM.UnknownContentTypeException.getContentType()Return the content type of the response, or "application/octet-stream".参数类型为MediaType的cn.taketoday.web.client中的方法修饰符和类型方法说明Set the list of acceptable media types, as specified by theAcceptheader.DefaultRestClient.DefaultRequestBodyUriSpec.contentType(MediaType contentType) RestClient.RequestBodySpec.contentType(MediaType contentType) Set the media type of the body, as specified by theContent-Typeheader.private voidDefaultRestClient.DefaultRequestBodyUriSpec.logBody(Object body, MediaType mediaType, HttpMessageConverter<?> converter) private voidRestTemplate.HttpEntityRequestCallback.logBody(Object body, MediaType mediaType, HttpMessageConverter<?> converter) 类型变量类型为MediaType的cn.taketoday.web.client中的方法参数修饰符和类型方法说明private voidRestTemplate.AcceptHeaderRequestCallback.putSupportedMediaTypes(Type type, HttpMessageConverter<?> converter, HashSet<MediaType> allSupportedMediaTypes) 参数类型为MediaType的cn.taketoday.web.client中的构造器限定符构造器说明UnknownContentTypeException(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. -
cn.taketoday.web.config中MediaType的使用
类型参数类型为MediaType的cn.taketoday.web.config中的字段返回变量类型为MediaType的类型的cn.taketoday.web.config中的方法参数类型为MediaType的cn.taketoday.web.config中的方法修饰符和类型方法说明ContentNegotiationConfigurer.defaultContentType(MediaType... defaultContentTypes) Set the default content type(s) to use when no content type is requested in order of priority.Add a mapping from a key, extracted from a path extension or a query parameter, to a MediaType.类型变量类型为MediaType的cn.taketoday.web.config中的方法参数修饰符和类型方法说明ContentNegotiationConfigurer.mediaTypes(Map<String, MediaType> mediaTypes) ContentNegotiationConfigurer.replaceMediaTypes(Map<String, MediaType> mediaTypes) Similar toContentNegotiationConfigurer.mediaType(java.lang.String, cn.taketoday.http.MediaType)but for replacing existing mappings. -
cn.taketoday.web.handler.condition中MediaType的使用
返回变量类型为MediaType的类型的cn.taketoday.web.handler.condition中的方法修饰符和类型方法说明MediaTypeExpression.filterNotNegated(List<MediaTypeExpression> expressions) ProducesRequestCondition.getAcceptedMediaTypes(RequestContext request) ConsumesRequestCondition.getConsumableMediaTypes()Returns the media types for this condition excluding negated expressions.ProducesRequestCondition.getProducibleMediaTypes()Return the contained producible media types excluding negated expressions.修饰符和类型方法说明private List<MediaTypeExpression>ConsumesRequestCondition.getMatchingExpressions(MediaType contentType) private intProducesRequestCondition.indexOfEqualMediaType(MediaType mediaType) private intProducesRequestCondition.indexOfIncludedMediaType(MediaType mediaType) booleanMediaTypeExpression.matchContentType(MediaType contentType) matches a single media type expression to a request's 'Content-Type' header.private booleanMediaTypeExpression.matchParameters(MediaType contentType) 类型变量类型为MediaType的cn.taketoday.web.handler.condition中的方法参数修饰符和类型方法说明private List<MediaTypeExpression>ProducesRequestCondition.getMatchingExpressions(List<MediaType> acceptedMediaTypes) booleanMediaTypeExpression.matchAccept(List<MediaType> acceptedMediaTypes) matches a single media type expression to a request's 'Accept' header.private booleanMediaTypeExpression.matchMediaType(List<MediaType> acceptedMediaTypes) 参数类型为MediaType的cn.taketoday.web.handler.condition中的构造器 -
cn.taketoday.web.handler.function中MediaType的使用
类型参数类型为MediaType的cn.taketoday.web.handler.function中的字段修饰符和类型字段说明RequestPredicates.AcceptPredicate.mediaTypesRequestPredicates.ContentTypePredicate.mediaTypes修饰符和类型方法说明private static MediaTypeDefaultEntityResponseBuilder.DefaultEntityResponse.getContentType(RequestContext response) 返回变量类型为MediaType的类型的cn.taketoday.web.handler.function中的方法修饰符和类型方法说明DefaultServerRequest.DefaultRequestHeaders.accept()ServerRequest.Headers.accept()Get the list of acceptable media types, as specified by theAcceptheader.RequestPredicates.AcceptPredicate.acceptedMediaTypes(ServerRequest.Headers headers) DefaultServerRequest.DefaultRequestHeaders.contentType()ServerRequest.Headers.contentType()Get the media type of the body, as specified by theContent-Typeheader.DefaultServerRequest.getSupportedMediaTypes(Class<?> bodyClass) DefaultEntityResponseBuilder.DefaultEntityResponse.producibleMediaTypes(List<HttpMessageConverter<?>> messageConverters, Class<?> entityClass) 修饰符和类型方法说明static RequestPredicateReturn aRequestPredicatethat tests if the request's accept header is compatible with any of the given media types.DefaultEntityResponseBuilder.contentType(MediaType contentType) DefaultServerResponseBuilder.contentType(MediaType contentType) EntityResponse.Builder.contentType(MediaType contentType) Set the media type of the body, as specified by theContent-Typeheader.static RequestPredicateRequestPredicates.contentType(MediaType... mediaTypes) Return aRequestPredicatethat tests if the request's content type is included by any of the given media types.ServerResponse.BodyBuilder.contentType(MediaType contentType) Set the media type of the body, as specified by theContent-Typeheader.voidAdd an SSE "data" line for the given object and sends the built server-sent event to the client.voidprivate voidSseServerResponse.DefaultSseBuilder.writeObject(Object data, MediaType mediaType) 参数类型为MediaType的cn.taketoday.web.handler.function中的构造器类型变量类型为MediaType的cn.taketoday.web.handler.function中的构造器参数限定符构造器说明privateAcceptPredicate(Set<MediaType> mediaTypes) privateContentTypePredicate(Set<MediaType> mediaTypes) -
cn.taketoday.web.handler.method中MediaType的使用
修饰符和类型字段说明final MediaTypeResponseBodyEmitter.DataWithMediaType.mediaTypeprivate static final MediaTypeSseEmitter.TEXT_PLAINprivate static final MediaTypeReactiveTypeHandler.WILDCARD_SUBTYPE_SUFFIXED_BY_NDJSON修饰符和类型方法说明(专用程序包) static MediaTypeReactiveTypeHandler.findConcreteStreamingMediaType(Collection<MediaType> acceptedMediaTypes) Attempts to find a concreteMediaTypethat can be streamed (as json separated by newlines in the response body).返回变量类型为MediaType的类型的cn.taketoday.web.handler.method中的方法修饰符和类型方法说明RequestMappingInfoHandlerMapping.PartialMatchHelper.getConsumableMediaTypes()Return declared "consumable" types but only among those that also match the "methods" condition.RequestMappingInfoHandlerMapping.PartialMatchHelper.getConsumablePatchMediaTypes()Return declared "consumable" types but only among those that have PATCH specified, or that have no methods at all.private Collection<MediaType>ReactiveTypeHandler.getMediaTypes(RequestContext request) RequestMappingInfoHandlerMapping.PartialMatchHelper.getProducibleMediaTypes()Return declared "producible" types but only among those that also match the "methods" and "consumes" conditions.参数类型为MediaType的cn.taketoday.web.handler.method中的方法修饰符和类型方法说明AbstractMappingJacksonResponseBodyAdvice.beforeBodyWrite(Object body, cn.taketoday.core.MethodParameter returnType, MediaType contentType, HttpMessageConverter<?> converter, RequestContext context) ResponseBodyAdvice.beforeBodyWrite(Object body, cn.taketoday.core.MethodParameter returnType, MediaType contentType, HttpMessageConverter<?> converter, RequestContext context) Invoked after anHttpMessageConverteris selected and just before its write method is invoked.protected abstract voidAbstractMappingJacksonResponseBodyAdvice.beforeBodyWriteInternal(MappingJacksonValue bodyContainer, MediaType contentType, cn.taketoday.core.MethodParameter returnType, RequestContext request) Invoked only if the converter type isMappingJackson2HttpMessageConverter.protected voidJsonViewResponseBodyAdvice.beforeBodyWriteInternal(MappingJacksonValue value, MediaType contentType, cn.taketoday.core.MethodParameter returnType, RequestContext request) Add an SSE "data" line.private ResponseBodyEmitterReactiveTypeHandler.getEmitter(MediaType mediaType) voidImmediately write and flush the given data to the network.voidOverloaded variant ofResponseBodyEmitter.send(Object)that also accepts a MediaType hint for how to serialize the given Object.voidResponseBodyEmitterReturnValueHandler.HttpMessageConvertingHandler.send(Object data, MediaType mediaType) voidSend the object formatted as a single SSE "data" line.private voidResponseBodyEmitterReturnValueHandler.HttpMessageConvertingHandler.sendInternal(Object data, MediaType mediaType) 类型变量类型为MediaType的cn.taketoday.web.handler.method中的方法参数修饰符和类型方法说明(专用程序包) static MediaTypeReactiveTypeHandler.findConcreteStreamingMediaType(Collection<MediaType> acceptedMediaTypes) Attempts to find a concreteMediaTypethat can be streamed (as json separated by newlines in the response body).参数类型为MediaType的cn.taketoday.web.handler.method中的构造器 -
cn.taketoday.web.handler.result中MediaType的使用
参数类型为MediaType的cn.taketoday.web.handler.result中的方法修饰符和类型方法说明voidRenderedImageReturnValueHandler.setContentType(MediaType contentType) set the response content-type -
cn.taketoday.web.reactive.function中MediaType的使用
类型参数类型为MediaType的cn.taketoday.web.reactive.function中的字段修饰符和类型方法说明UnsupportedMediaTypeException.getContentType()Return the request Content-Type header if it was parsed successfully, ornullotherwise.返回变量类型为MediaType的类型的cn.taketoday.web.reactive.function中的方法修饰符和类型方法说明UnsupportedMediaTypeException.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.修饰符和类型方法说明private static <T> HttpMessageReader<T>BodyExtractors.findReader(cn.taketoday.core.ResolvableType elementType, MediaType mediaType, BodyExtractor.Context context) private static <T> HttpMessageWriter<T>BodyInserters.findWriter(BodyInserter.Context context, cn.taketoday.core.ResolvableType elementType, MediaType mediaType) private static StringUnsupportedMediaTypeException.initReason(MediaType contentType, cn.taketoday.core.ResolvableType bodyType) private static UnsupportedMediaTypeExceptionBodyInserters.unsupportedError(cn.taketoday.core.ResolvableType bodyType, BodyInserter.Context context, MediaType mediaType) private static <T> reactor.core.publisher.Mono<Void>BodyInserters.write(org.reactivestreams.Publisher<? extends T> input, cn.taketoday.core.ResolvableType type, MediaType mediaType, ReactiveHttpOutputMessage message, BodyInserter.Context context, HttpMessageWriter<T> writer) 参数类型为MediaType的cn.taketoday.web.reactive.function中的构造器限定符构造器说明UnsupportedMediaTypeException(MediaType contentType, List<MediaType> supportedTypes) Constructor for when the Content-Type can be parsed but is not supported.UnsupportedMediaTypeException(MediaType contentType, List<MediaType> supportedTypes, cn.taketoday.core.ResolvableType bodyType) Constructor for when trying to encode from or decode to a specific Java type.类型变量类型为MediaType的cn.taketoday.web.reactive.function中的构造器参数限定符构造器说明UnsupportedMediaTypeException(MediaType contentType, List<MediaType> supportedTypes) Constructor for when the Content-Type can be parsed but is not supported.UnsupportedMediaTypeException(MediaType contentType, List<MediaType> supportedTypes, cn.taketoday.core.ResolvableType bodyType) Constructor for when trying to encode from or decode to a specific Java type. -
cn.taketoday.web.reactive.function.client中MediaType的使用
返回变量类型为MediaType的类型的cn.taketoday.web.reactive.function.client中的方法修饰符和类型方法说明ClientResponse.Headers.contentType()Return the media type of the body, as specified by theContent-Typeheader.DefaultClientResponse.DefaultHeaders.contentType()修饰符和类型方法说明Set the list of acceptable media types, as specified by theAcceptheader.DefaultWebClient.DefaultRequestBodyUriSpec.contentType(MediaType contentType) WebClient.RequestBodySpec.contentType(MediaType contentType) Set the media type of the body, as specified by theContent-Typeheader.private Function<cn.taketoday.core.ResolvableType,?> DefaultClientResponse.initDecodeFunction(byte[] body, MediaType contentType) -
cn.taketoday.web.reactive.function.client.support中MediaType的使用
返回变量类型为MediaType的类型的cn.taketoday.web.reactive.function.client.support中的方法 -
cn.taketoday.web.resource中MediaType的使用
类型参数类型为MediaType的cn.taketoday.web.resource中的字段修饰符和类型方法说明protected MediaTypeResourceHttpRequestHandler.getMediaType(RequestContext request, cn.taketoday.core.io.Resource resource) Determine the media type for the given request and the resource matched to it.返回变量类型为MediaType的类型的cn.taketoday.web.resource中的方法参数类型为MediaType的cn.taketoday.web.resource中的方法修饰符和类型方法说明protected voidResourceHttpRequestHandler.setHeaders(RequestContext response, cn.taketoday.core.io.Resource resource, MediaType mediaType) Set headers on the given servlet response.类型变量类型为MediaType的cn.taketoday.web.resource中的方法参数修饰符和类型方法说明voidResourceHttpRequestHandler.setMediaTypes(Map<String, MediaType> mediaTypes) Add mappings between file extensions, extracted from the filename of a staticResource, and corresponding media type to set on the response. -
cn.taketoday.web.service.invoker中MediaType的使用
修饰符和类型字段说明private final MediaTypeHttpServiceMethod.HttpRequestValuesInitializer.contentTypecontentType记录组件的字段。类型参数类型为MediaType的cn.taketoday.web.service.invoker中的字段修饰符和类型字段说明HttpServiceMethod.HttpRequestValuesInitializer.acceptMediaTypesacceptMediaTypes记录组件的字段。修饰符和类型方法说明HttpServiceMethod.HttpRequestValuesInitializer.contentType()返回contentType记录组件的值。private static MediaTypeHttpServiceMethod.HttpRequestValuesInitializer.initContentType(HttpExchange typeAnnot, HttpExchange annot) 返回变量类型为MediaType的类型的cn.taketoday.web.service.invoker中的方法修饰符和类型方法说明HttpServiceMethod.HttpRequestValuesInitializer.acceptMediaTypes()返回acceptMediaTypes记录组件的值。HttpServiceMethod.HttpRequestValuesInitializer.initAccept(HttpExchange typeAnnot, HttpExchange annot) 修饰符和类型方法说明HttpRequestValues.Builder.setContentType(MediaType contentType) Set the media type for the requestContent-Typeheader.ReactiveHttpRequestValues.Builder.setContentType(MediaType contentType) 类型变量类型为MediaType的cn.taketoday.web.service.invoker中的方法参数修饰符和类型方法说明Set the media types for the requestAcceptheader.参数类型为MediaType的cn.taketoday.web.service.invoker中的构造器限定符构造器说明privateHttpRequestValuesInitializer(HttpMethod httpMethod, String url, MediaType contentType, List<MediaType> acceptMediaTypes, Supplier<HttpRequestValues.Builder> requestValuesSupplier) 创建HttpRequestValuesInitializer记录的实例。类型变量类型为MediaType的cn.taketoday.web.service.invoker中的构造器参数限定符构造器说明privateHttpRequestValuesInitializer(HttpMethod httpMethod, String url, MediaType contentType, List<MediaType> acceptMediaTypes, Supplier<HttpRequestValues.Builder> requestValuesSupplier) 创建HttpRequestValuesInitializer记录的实例。 -
cn.taketoday.web.view中MediaType的使用
修饰符和类型方法说明private MediaTypeContentNegotiatingViewResolver.getMostSpecificMediaType(MediaType acceptType, MediaType produceType) Return the more specific of the acceptable and the producible media types with the q-value of the former.private MediaType[]ContentNegotiatingViewResolver.getProducibleMediaTypes(RequestContext context) 返回变量类型为MediaType的类型的cn.taketoday.web.view中的方法修饰符和类型方法说明ContentNegotiatingViewResolver.getMediaTypes(RequestContext context) Determines the list ofMediaTypefor the givenHttpServletRequest.参数类型为MediaType的cn.taketoday.web.view中的方法修饰符和类型方法说明private MediaTypeContentNegotiatingViewResolver.getMostSpecificMediaType(MediaType acceptType, MediaType produceType) Return the more specific of the acceptable and the producible media types with the q-value of the former.类型变量类型为MediaType的cn.taketoday.web.view中的方法参数