类的使用
org.springframework.util.MimeType
使用MimeType的程序包 程序包 说明 org.springframework.core.codec org.springframework.http Contains a basic abstraction over client/server-side HTTP.org.springframework.http.codec.cbor org.springframework.http.codec.json JSON encoder and decoder support.org.springframework.http.codec.protobuf Provides an encoder and a decoder for Google Protocol Buffers.org.springframework.http.codec.xml XML encoder and decoder support.org.springframework.messaging.converter Provides support for message conversion.org.springframework.messaging.handler.annotation.reactive Support classes for working with annotated message-handling methods with non-blocking, reactive contracts.org.springframework.messaging.rsocket Support for the RSocket protocol.org.springframework.messaging.rsocket.annotation.support Support classes for working with annotated RSocket stream handling methods.org.springframework.messaging.simp.stomp Generic support for simple messaging protocols (like STOMP).org.springframework.messaging.support Provides implementations ofMessage
along with a MessageBuilder and MessageHeaderAccessor for building and working with messages and message headers, as well as variousMessageChannel
implementations and channel interceptor support.org.springframework.util Miscellaneous utility classes, such as String manipulation utilities, a Log4J configurer, and a state holder for paged lists of objects.org.springframework.core.codec中MimeType的使用
返回变量类型为MimeType的类型的org.springframework.core.codec中的方法 修饰符和类型 方法 说明 List<MimeType>
AbstractDecoder. getDecodableMimeTypes()
List<MimeType>
Decoder. getDecodableMimeTypes()
Return the list of MIME types this decoder supports.List<MimeType>
AbstractEncoder. getEncodableMimeTypes()
List<MimeType>
Encoder. getEncodableMimeTypes()
Return the list of mime types this encoder supports.参数类型为MimeType的org.springframework.core.codec中的方法 修饰符和类型 方法 说明 boolean
AbstractDecoder. canDecode(ResolvableType elementType, MimeType mimeType)
boolean
ByteArrayDecoder. canDecode(ResolvableType elementType, MimeType mimeType)
boolean
ByteBufferDecoder. canDecode(ResolvableType elementType, MimeType mimeType)
boolean
DataBufferDecoder. canDecode(ResolvableType elementType, MimeType mimeType)
boolean
Decoder. canDecode(ResolvableType elementType, MimeType mimeType)
Whether the decoder supports the given target element type and the MIME type of the source stream.boolean
ResourceDecoder. canDecode(ResolvableType elementType, MimeType mimeType)
boolean
StringDecoder. canDecode(ResolvableType elementType, MimeType mimeType)
boolean
AbstractEncoder. canEncode(ResolvableType elementType, MimeType mimeType)
boolean
ByteArrayEncoder. canEncode(ResolvableType elementType, MimeType mimeType)
boolean
ByteBufferEncoder. canEncode(ResolvableType elementType, MimeType mimeType)
boolean
CharSequenceEncoder. canEncode(ResolvableType elementType, MimeType mimeType)
boolean
DataBufferEncoder. canEncode(ResolvableType elementType, MimeType mimeType)
boolean
Encoder. canEncode(ResolvableType elementType, MimeType mimeType)
Whether the encoder supports the given source element type and the MIME type for the output stream.boolean
ResourceEncoder. canEncode(ResolvableType elementType, MimeType mimeType)
boolean
ResourceRegionEncoder. canEncode(ResolvableType elementType, MimeType mimeType)
reactor.core.publisher.Flux<T>
AbstractDataBufferDecoder. decode(org.reactivestreams.Publisher<DataBuffer> input, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
byte[]
ByteArrayDecoder. decode(DataBuffer dataBuffer, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
ByteBuffer
ByteBufferDecoder. decode(DataBuffer dataBuffer, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
reactor.core.publisher.Flux<DataBuffer>
DataBufferDecoder. decode(org.reactivestreams.Publisher<DataBuffer> input, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
DataBuffer
DataBufferDecoder. decode(DataBuffer buffer, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
reactor.core.publisher.Flux<T>
Decoder. decode(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
Decode aDataBuffer
input stream into a Flux ofT
.default T
Decoder. decode(DataBuffer buffer, ResolvableType targetType, MimeType mimeType, Map<String,Object> hints)
Decode a data buffer to an Object of type T.reactor.core.publisher.Flux<Resource>
ResourceDecoder. decode(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
Resource
ResourceDecoder. decode(DataBuffer dataBuffer, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
reactor.core.publisher.Flux<String>
StringDecoder. decode(org.reactivestreams.Publisher<DataBuffer> input, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
String
StringDecoder. decode(DataBuffer dataBuffer, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
protected T
AbstractDataBufferDecoder. decodeDataBuffer(DataBuffer buffer, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
已过时。as of 5.2, please implementDecoder.decode(DataBuffer, ResolvableType, MimeType, Map)
insteadreactor.core.publisher.Mono<T>
AbstractDataBufferDecoder. decodeToMono(org.reactivestreams.Publisher<DataBuffer> input, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
reactor.core.publisher.Mono<T>
AbstractDecoder. decodeToMono(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
reactor.core.publisher.Mono<T>
Decoder. decodeToMono(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
Decode aDataBuffer
input stream into a Mono ofT
.reactor.core.publisher.Flux<DataBuffer>
AbstractSingleValueEncoder. encode(org.reactivestreams.Publisher<? extends T> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
protected abstract reactor.core.publisher.Flux<DataBuffer>
AbstractSingleValueEncoder. encode(T t, DataBufferFactory dataBufferFactory, ResolvableType type, MimeType mimeType, Map<String,Object> hints)
EncodeT
to an outputDataBuffer
stream.reactor.core.publisher.Flux<DataBuffer>
ByteArrayEncoder. encode(org.reactivestreams.Publisher<? extends byte[]> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
reactor.core.publisher.Flux<DataBuffer>
ByteBufferEncoder. encode(org.reactivestreams.Publisher<? extends ByteBuffer> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
reactor.core.publisher.Flux<DataBuffer>
CharSequenceEncoder. encode(org.reactivestreams.Publisher<? extends CharSequence> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
reactor.core.publisher.Flux<DataBuffer>
DataBufferEncoder. encode(org.reactivestreams.Publisher<? extends DataBuffer> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
reactor.core.publisher.Flux<DataBuffer>
Encoder. encode(org.reactivestreams.Publisher<? extends T> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
Encode a stream of Objects of typeT
into aDataBuffer
output stream.protected reactor.core.publisher.Flux<DataBuffer>
ResourceEncoder. encode(Resource resource, DataBufferFactory bufferFactory, ResolvableType type, MimeType mimeType, Map<String,Object> hints)
reactor.core.publisher.Flux<DataBuffer>
ResourceRegionEncoder. encode(org.reactivestreams.Publisher<? extends ResourceRegion> input, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
DataBuffer
ByteArrayEncoder. encodeValue(byte[] bytes, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)
DataBuffer
ByteBufferEncoder. encodeValue(ByteBuffer byteBuffer, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)
DataBuffer
CharSequenceEncoder. encodeValue(CharSequence charSequence, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)
DataBuffer
DataBufferEncoder. encodeValue(DataBuffer buffer, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)
default DataBuffer
Encoder. encodeValue(T value, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)
Encode an Object of type T to a data buffer.参数类型为MimeType的org.springframework.core.codec中的构造器 构造器 说明 AbstractDataBufferDecoder(MimeType... supportedMimeTypes)
AbstractDecoder(MimeType... supportedMimeTypes)
AbstractEncoder(MimeType... supportedMimeTypes)
AbstractSingleValueEncoder(MimeType... supportedMimeTypes)
org.springframework.http中MimeType的使用
org.springframework.http中MimeType的子类 修饰符和类型 类 说明 class
MediaType
A subclass ofMimeType
that adds support for quality parameters as defined in the HTTP specification.参数类型为MimeType的org.springframework.http中的方法 修饰符和类型 方法 说明 static MediaType
MediaType. asMediaType(MimeType mimeType)
Re-create the given mime type as a media type.类型变量类型为MimeType的org.springframework.http中的方法参数 修饰符和类型 方法 说明 static List<MediaType>
MediaType. asMediaTypes(List<MimeType> mimeTypes)
Re-create the given mime types as media types.org.springframework.http.codec.cbor中MimeType的使用
参数类型为MimeType的org.springframework.http.codec.cbor中的方法 修饰符和类型 方法 说明 reactor.core.publisher.Flux<Object>
Jackson2CborDecoder. decode(org.reactivestreams.Publisher<DataBuffer> input, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
reactor.core.publisher.Flux<DataBuffer>
Jackson2CborEncoder. encode(org.reactivestreams.Publisher<?> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
参数类型为MimeType的org.springframework.http.codec.cbor中的构造器 构造器 说明 Jackson2CborDecoder(ObjectMapper mapper, MimeType... mimeTypes)
Jackson2CborEncoder(ObjectMapper mapper, MimeType... mimeTypes)
org.springframework.http.codec.json中MimeType的使用
返回变量类型为MimeType的类型的org.springframework.http.codec.json中的方法 修饰符和类型 方法 说明 List<MimeType>
AbstractJackson2Decoder. getDecodableMimeTypes()
List<MimeType>
AbstractJackson2Encoder. getEncodableMimeTypes()
protected List<MimeType>
Jackson2CodecSupport. getMimeTypes()
Subclasses should expose this as "decodable" or "encodable" mime types.参数类型为MimeType的org.springframework.http.codec.json中的方法 修饰符和类型 方法 说明 boolean
AbstractJackson2Decoder. canDecode(ResolvableType elementType, MimeType mimeType)
boolean
AbstractJackson2Encoder. canEncode(ResolvableType elementType, MimeType mimeType)
protected ObjectWriter
AbstractJackson2Encoder. customizeWriter(ObjectWriter writer, MimeType mimeType, ResolvableType elementType, Map<String,Object> hints)
protected ObjectWriter
Jackson2JsonEncoder. customizeWriter(ObjectWriter writer, MimeType mimeType, ResolvableType elementType, Map<String,Object> hints)
reactor.core.publisher.Flux<Object>
AbstractJackson2Decoder. decode(org.reactivestreams.Publisher<DataBuffer> input, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
Object
AbstractJackson2Decoder. decode(DataBuffer dataBuffer, ResolvableType targetType, MimeType mimeType, Map<String,Object> hints)
reactor.core.publisher.Mono<Object>
AbstractJackson2Decoder. decodeToMono(org.reactivestreams.Publisher<DataBuffer> input, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
reactor.core.publisher.Flux<DataBuffer>
AbstractJackson2Encoder. encode(org.reactivestreams.Publisher<?> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
DataBuffer
AbstractJackson2Encoder. encodeValue(Object value, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)
protected JsonEncoding
AbstractJackson2Encoder. getJsonEncoding(MimeType mimeType)
Determine the JSON encoding to use for the given mime type.protected reactor.core.publisher.Flux<DataBuffer>
AbstractJackson2Decoder. processInput(org.reactivestreams.Publisher<DataBuffer> input, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
Process the input publisher into a flux.protected reactor.core.publisher.Flux<DataBuffer>
Jackson2JsonDecoder. processInput(org.reactivestreams.Publisher<DataBuffer> input, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
protected boolean
Jackson2CodecSupport. supportsMimeType(MimeType mimeType)
参数类型为MimeType的org.springframework.http.codec.json中的构造器 构造器 说明 AbstractJackson2Decoder(ObjectMapper mapper, MimeType... mimeTypes)
Constructor with a JacksonObjectMapper
to use.AbstractJackson2Encoder(ObjectMapper mapper, MimeType... mimeTypes)
Constructor with a JacksonObjectMapper
to use.Jackson2CodecSupport(ObjectMapper objectMapper, MimeType... mimeTypes)
Constructor with a JacksonObjectMapper
to use.Jackson2JsonDecoder(ObjectMapper mapper, MimeType... mimeTypes)
Jackson2JsonEncoder(ObjectMapper mapper, MimeType... mimeTypes)
Jackson2SmileDecoder(ObjectMapper mapper, MimeType... mimeTypes)
Jackson2SmileEncoder(ObjectMapper mapper, MimeType... mimeTypes)
org.springframework.http.codec.protobuf中MimeType的使用
返回变量类型为MimeType的类型的org.springframework.http.codec.protobuf中的方法 修饰符和类型 方法 说明 List<MimeType>
ProtobufDecoder. getDecodableMimeTypes()
List<MimeType>
ProtobufEncoder. getEncodableMimeTypes()
protected List<MimeType>
ProtobufCodecSupport. getMimeTypes()
参数类型为MimeType的org.springframework.http.codec.protobuf中的方法 修饰符和类型 方法 说明 boolean
ProtobufDecoder. canDecode(ResolvableType elementType, MimeType mimeType)
boolean
ProtobufEncoder. canEncode(ResolvableType elementType, MimeType mimeType)
reactor.core.publisher.Flux<com.google.protobuf.Message>
ProtobufDecoder. decode(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
com.google.protobuf.Message
ProtobufDecoder. decode(DataBuffer dataBuffer, ResolvableType targetType, MimeType mimeType, Map<String,Object> hints)
reactor.core.publisher.Mono<com.google.protobuf.Message>
ProtobufDecoder. decodeToMono(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
reactor.core.publisher.Flux<DataBuffer>
ProtobufEncoder. encode(org.reactivestreams.Publisher<? extends com.google.protobuf.Message> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
DataBuffer
ProtobufEncoder. encodeValue(com.google.protobuf.Message message, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)
protected boolean
ProtobufCodecSupport. supportsMimeType(MimeType mimeType)
org.springframework.http.codec.xml中MimeType的使用
参数类型为MimeType的org.springframework.http.codec.xml中的方法 修饰符和类型 方法 说明 boolean
Jaxb2XmlDecoder. canDecode(ResolvableType elementType, MimeType mimeType)
boolean
Jaxb2XmlEncoder. canEncode(ResolvableType elementType, MimeType mimeType)
reactor.core.publisher.Flux<Object>
Jaxb2XmlDecoder. decode(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
Object
Jaxb2XmlDecoder. decode(DataBuffer dataBuffer, ResolvableType targetType, MimeType mimeType, Map<String,Object> hints)
reactor.core.publisher.Flux<XMLEvent>
XmlEventDecoder. decode(org.reactivestreams.Publisher<DataBuffer> input, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
reactor.core.publisher.Mono<Object>
Jaxb2XmlDecoder. decodeToMono(org.reactivestreams.Publisher<DataBuffer> input, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
protected reactor.core.publisher.Flux<DataBuffer>
Jaxb2XmlEncoder. encode(Object value, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)
DataBuffer
Jaxb2XmlEncoder. encodeValue(Object value, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)
参数类型为MimeType的org.springframework.http.codec.xml中的构造器 构造器 说明 Jaxb2XmlDecoder(MimeType... supportedMimeTypes)
Create aJaxb2XmlDecoder
with the specified MIME types.org.springframework.messaging.converter中MimeType的使用
声明为MimeType的org.springframework.messaging.converter中的字段 修饰符和类型 字段 说明 static MimeType
ProtobufMessageConverter. PROTOBUF
The mime-type for protobufapplication/x-protobuf
.返回MimeType的org.springframework.messaging.converter中的方法 修饰符和类型 方法 说明 protected MimeType
AbstractMessageConverter. getDefaultContentType(Object payload)
Return the default content type for the payload.MimeType
DefaultContentTypeResolver. getDefaultMimeType()
Return the default MIME type to use if noMessageHeaders.CONTENT_TYPE
header is present.protected MimeType
AbstractMessageConverter. getMimeType(MessageHeaders headers)
MimeType
ContentTypeResolver. resolve(MessageHeaders headers)
Determine theMimeType
of a message from the given MessageHeaders.MimeType
DefaultContentTypeResolver. resolve(MessageHeaders headers)
返回变量类型为MimeType的类型的org.springframework.messaging.converter中的方法 修饰符和类型 方法 说明 List<MimeType>
AbstractMessageConverter. getSupportedMimeTypes()
Return the supported MIME types.参数类型为MimeType的org.springframework.messaging.converter中的方法 修饰符和类型 方法 说明 protected void
AbstractMessageConverter. addSupportedMimeTypes(MimeType... supportedMimeTypes)
Allows subclasses to add more supported mime types.protected JsonEncoding
MappingJackson2MessageConverter. getJsonEncoding(MimeType contentType)
Determine the JSON encoding to use for the given content type.void
DefaultContentTypeResolver. setDefaultMimeType(MimeType defaultMimeType)
Set the default MIME type to use when there is noMessageHeaders.CONTENT_TYPE
header present.参数类型为MimeType的org.springframework.messaging.converter中的构造器 构造器 说明 AbstractMessageConverter(MimeType supportedMimeType)
Constructor with a single MIME type.AbstractMessageConverter(MimeType... supportedMimeTypes)
Constructor with one or more MIME types via vararg.MappingJackson2MessageConverter(MimeType... supportedMimeTypes)
Construct aMappingJackson2MessageConverter
supporting one or more custom MIME types.MarshallingMessageConverter(MimeType... supportedMimeTypes)
Constructor with a given list of MIME types to support.类型变量类型为MimeType的org.springframework.messaging.converter中的构造器参数 构造器 说明 AbstractMessageConverter(Collection<MimeType> supportedMimeTypes)
Constructor with a Collection of MIME types.org.springframework.messaging.handler.annotation.reactive中MimeType的使用
返回MimeType的org.springframework.messaging.handler.annotation.reactive中的方法 修饰符和类型 方法 说明 protected MimeType
PayloadMethodArgumentResolver. getMimeType(Message<?> message)
Return the mime type for the content.org.springframework.messaging.rsocket中MimeType的使用
返回MimeType的org.springframework.messaging.rsocket中的方法 修饰符和类型 方法 说明 MimeType
RSocketRequester. dataMimeType()
Return the dataMimeType
selected for the underlying RSocket at connection time.MimeType
RSocketRequester. metadataMimeType()
Return the metadataMimeType
selected for the underlying RSocket at connection time.参数类型为MimeType的org.springframework.messaging.rsocket中的方法 修饰符和类型 方法 说明 RSocketRequester.Builder
RSocketRequester.Builder. dataMimeType(MimeType mimeType)
Configure the payload data MimeType to specify on theSETUP
frame that applies to the whole connection.default <T> Decoder<T>
RSocketStrategies. decoder(ResolvableType elementType, MimeType mimeType)
Find a compatible Decoder for the given element type.default <T> Encoder<T>
RSocketStrategies. encoder(ResolvableType elementType, MimeType mimeType)
Find a compatible Encoder for the given element type.Map<String,Object>
DefaultMetadataExtractor. extract(io.rsocket.Payload payload, MimeType metadataMimeType)
Map<String,Object>
MetadataExtractor. extract(io.rsocket.Payload payload, MimeType metadataMimeType)
Extract a map of values from the givenPayload
metadata.RSocketRequester.RequestSpec
RSocketRequester. metadata(Object metadata, MimeType mimeType)
Begin to specify a new request with the given metadata value, which can be a concrete value or any producer of a single value that can be adapted to aPublisher
viaReactiveAdapterRegistry
.S
RSocketRequester.MetadataSpec. metadata(Object metadata, MimeType mimeType)
Use this to append additional metadata entries when using composite metadata.RSocketRequester.Builder
RSocketRequester.Builder. metadataMimeType(MimeType mimeType)
Configure the payload metadata MimeType to specify on theSETUP
frame that applies to the whole connection.<T> void
DefaultMetadataExtractor. metadataToExtract(MimeType mimeType, Class<T> targetType, BiConsumer<T,Map<String,Object>> mapper)
<T> void
DefaultMetadataExtractor. metadataToExtract(MimeType mimeType, ParameterizedTypeReference<T> type, BiConsumer<T,Map<String,Object>> mapper)
default void
MetadataExtractorRegistry. metadataToExtract(MimeType mimeType, Class<?> targetType, String name)
Decode metadata entries with the givenMimeType
to the specified target class, and store the decoded value in the output map under the given name.<T> void
MetadataExtractorRegistry. metadataToExtract(MimeType mimeType, Class<T> targetType, BiConsumer<T,Map<String,Object>> mapper)
Variant ofMetadataExtractorRegistry.metadataToExtract(MimeType, Class, String)
that allows custom logic to be used to map the decoded value to any number of values in the output map.default void
MetadataExtractorRegistry. metadataToExtract(MimeType mimeType, ParameterizedTypeReference<?> targetType, String name)
Variant ofMetadataExtractorRegistry.metadataToExtract(MimeType, Class, String)
that acceptsParameterizedTypeReference
instead ofClass
for specifying a target type with generic parameters.<T> void
MetadataExtractorRegistry. metadataToExtract(MimeType mimeType, ParameterizedTypeReference<T> type, BiConsumer<T,Map<String,Object>> mapper)
Variant ofMetadataExtractorRegistry.metadataToExtract(MimeType, Class, BiConsumer)
that acceptsParameterizedTypeReference
instead ofClass
for specifying a target type with generic parameters.RSocketRequester.Builder
RSocketRequester.Builder. setupMetadata(Object value, MimeType mimeType)
Add metadata entry to the setup payload.static RSocketRequester
RSocketRequester. wrap(io.rsocket.RSocket rsocket, MimeType dataMimeType, MimeType metadataMimeType, RSocketStrategies strategies)
Wrap an existingRSocket
.org.springframework.messaging.rsocket.annotation.support中MimeType的使用
返回MimeType的org.springframework.messaging.rsocket.annotation.support中的方法 修饰符和类型 方法 说明 MimeType
RSocketMessageHandler. getDefaultDataMimeType()
Return the configureddefaultDataMimeType
, ornull
.MimeType
RSocketMessageHandler. getDefaultMetadataMimeType()
Return the configureddefaultMetadataMimeType
.参数类型为MimeType的org.springframework.messaging.rsocket.annotation.support中的方法 修饰符和类型 方法 说明 void
RSocketMessageHandler. setDefaultDataMimeType(MimeType mimeType)
Configure the default content type to use for data payloads if theSETUP
frame did not specify one.void
RSocketMessageHandler. setDefaultMetadataMimeType(MimeType mimeType)
Configure the defaultMimeType
for payload data if theSETUP
frame did not specify one.org.springframework.messaging.simp.stomp中MimeType的使用
返回MimeType的org.springframework.messaging.simp.stomp中的方法 修饰符和类型 方法 说明 MimeType
StompHeaders. getContentType()
Return the content-type header value.参数类型为MimeType的org.springframework.messaging.simp.stomp中的方法 修饰符和类型 方法 说明 void
StompHeaderAccessor. setContentType(MimeType contentType)
void
StompHeaders. setContentType(MimeType mimeType)
Set the content-type header.org.springframework.messaging.support中MimeType的使用
返回MimeType的org.springframework.messaging.support中的方法 修饰符和类型 方法 说明 MimeType
MessageHeaderAccessor. getContentType()
参数类型为MimeType的org.springframework.messaging.support中的方法 修饰符和类型 方法 说明 void
MessageHeaderAccessor. setContentType(MimeType contentType)
org.springframework.util中MimeType的使用
类型参数类型为MimeType的org.springframework.util中的类 修饰符和类型 类 说明 static class
MimeType.SpecificityComparator<T extends MimeType>
Comparator to sortMimeTypes
in order of specificity.声明为MimeType的org.springframework.util中的字段 修饰符和类型 字段 说明 static MimeType
MimeTypeUtils. ALL
Public constant mime type that includes all media ranges (i.estatic MimeType
MimeTypeUtils. APPLICATION_JSON
Public constant mime type forapplication/json
.static MimeType
MimeTypeUtils. APPLICATION_OCTET_STREAM
Public constant mime type forapplication/octet-stream
.static MimeType
MimeTypeUtils. APPLICATION_XML
Public constant mime type forapplication/xml
.static MimeType
MimeTypeUtils. IMAGE_GIF
Public constant mime type forimage/gif
.static MimeType
MimeTypeUtils. IMAGE_JPEG
Public constant mime type forimage/jpeg
.static MimeType
MimeTypeUtils. IMAGE_PNG
Public constant mime type forimage/png
.static MimeType
MimeTypeUtils. TEXT_HTML
Public constant mime type fortext/html
.static MimeType
MimeTypeUtils. TEXT_PLAIN
Public constant mime type fortext/plain
.static MimeType
MimeTypeUtils. TEXT_XML
Public constant mime type fortext/xml
.类型参数类型为MimeType的org.springframework.util中的字段 修饰符和类型 字段 说明 static Comparator<MimeType>
MimeTypeUtils. SPECIFICITY_COMPARATOR
Comparator used byMimeTypeUtils.sortBySpecificity(List)
.返回MimeType的org.springframework.util中的方法 修饰符和类型 方法 说明 static MimeType
MimeTypeUtils. parseMimeType(String mimeType)
Parse the given String into a singleMimeType
.static MimeType
MimeType. valueOf(String value)
Parse the given String value into aMimeType
object, with this method name following the 'valueOf' naming convention (as supported byConversionService
.返回变量类型为MimeType的类型的org.springframework.util中的方法 修饰符和类型 方法 说明 static List<MimeType>
MimeTypeUtils. parseMimeTypes(String mimeTypes)
Parse the comma-separated string into a list ofMimeType
objects.参数类型为MimeType的org.springframework.util中的方法 修饰符和类型 方法 说明 int
MimeType. compareTo(MimeType other)
Compares this MIME Type to another alphabetically.boolean
MimeType. equalsTypeAndSubtype(MimeType other)
Similar toequals(Object)
but based on the type and subtype only, i.e. ignoring parameters.boolean
MimeType. includes(MimeType other)
Indicate whether this MIME Type includes the given MIME Type.boolean
MimeType. isCompatibleWith(MimeType other)
Indicate whether this MIME Type is compatible with the given MIME Type.类型变量类型为MimeType的org.springframework.util中的方法参数 修饰符和类型 方法 说明 boolean
MimeType. isPresentIn(Collection<? extends MimeType> mimeTypes)
UnlikeCollection.contains(Object)
which relies onequals(Object)
, this method only checks the type and the subtype, but otherwise ignores parameters.static void
MimeTypeUtils. sortBySpecificity(List<MimeType> mimeTypes)
Sorts the given list ofMimeType
objects by specificity.static String
MimeTypeUtils. toString(Collection<? extends MimeType> mimeTypes)
Return a string representation of the given list ofMimeType
objects.参数类型为MimeType的org.springframework.util中的构造器 构造器 说明 MimeType(MimeType other, Charset charset)
Copy-constructor that copies the type, subtype, parameters of the givenMimeType
, and allows to set the specified character set.MimeType(MimeType other, Map<String,String> parameters)
Copy-constructor that copies the type and subtype of the givenMimeType
, and allows for different parameter.