类 MultipartHttpMessageReader
java.lang.Object
cn.taketoday.http.codec.LoggingCodecSupport
cn.taketoday.http.codec.multipart.MultipartHttpMessageReader
- 所有已实现的接口:
HttpMessageReader<cn.taketoday.util.MultiValueMap<String,Part>>
public class MultipartHttpMessageReader
extends LoggingCodecSupport
implements HttpMessageReader<cn.taketoday.util.MultiValueMap<String,Part>>
HttpMessageReader for reading "multipart/form-data" requests
into a MultiValueMap<String, Part>.
Note that this reader depends on access to an
HttpMessageReader<Part> for the actual parsing of multipart content.
The purpose of this reader is to collect the parts into a map.
- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
-
字段概要
字段修饰符和类型字段说明private static final cn.taketoday.core.ResolvableTypeprivate final HttpMessageReader<Part>从类继承的字段 cn.taketoday.http.codec.LoggingCodecSupport
logger -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明booleanWhether the given object type is supported by this reader.Return the configured parts reader.Return the list of media types supported by this reader.read(cn.taketoday.core.ResolvableType elementType, ReactiveHttpInputMessage message, Map<String, Object> hints) Read from the input message and decode to a stream of objects.readMono(cn.taketoday.core.ResolvableType elementType, ReactiveHttpInputMessage inputMessage, Map<String, Object> hints) Read from the input message and decode to a single object.toList(Collection<Part> collection) toMultiValueMap(Map<String, Collection<Part>> map) 从类继承的方法 cn.taketoday.http.codec.LoggingCodecSupport
isEnableLoggingRequestDetails, setEnableLoggingRequestDetails从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.taketoday.http.codec.HttpMessageReader
getReadableMediaTypes, read, readMono
-
字段详细资料
-
MULTIPART_VALUE_TYPE
private static final cn.taketoday.core.ResolvableType MULTIPART_VALUE_TYPE -
MIME_TYPES
-
partReader
-
-
构造器详细资料
-
MultipartHttpMessageReader
-
-
方法详细资料
-
getPartReader
Return the configured parts reader. -
getReadableMediaTypes
从接口复制的说明:HttpMessageReaderReturn the list of media types supported by this reader. The list may not apply to every possible target element type and calls to this method should typically be guarded viacanWrite(elementType, null). The list may also exclude media types supported only for a specific element type. Alternatively, useHttpMessageReader.getReadableMediaTypes(ResolvableType)for a more precise list.- 指定者:
getReadableMediaTypes在接口中HttpMessageReader<cn.taketoday.util.MultiValueMap<String,Part>> - 返回:
- the general list of supported media types
-
canRead
从接口复制的说明:HttpMessageReaderWhether the given object type is supported by this reader.- 指定者:
canRead在接口中HttpMessageReader<cn.taketoday.util.MultiValueMap<String,Part>> - 参数:
elementType- the type of object to checkmediaType- the media type for the read (possiblynull)- 返回:
trueif readable,falseotherwise
-
read
public reactor.core.publisher.Flux<cn.taketoday.util.MultiValueMap<String,Part>> read(cn.taketoday.core.ResolvableType elementType, ReactiveHttpInputMessage message, Map<String, Object> hints) 从接口复制的说明:HttpMessageReaderRead from the input message and decode to a stream of objects.- 指定者:
read在接口中HttpMessageReader<cn.taketoday.util.MultiValueMap<String,Part>> - 参数:
elementType- the type of objects in the stream which must have been previously checked viaHttpMessageReader.canRead(ResolvableType, MediaType)message- the message to read fromhints- additional information about how to read and decode the input- 返回:
- the decoded stream of elements
-
readMono
public reactor.core.publisher.Mono<cn.taketoday.util.MultiValueMap<String,Part>> readMono(cn.taketoday.core.ResolvableType elementType, ReactiveHttpInputMessage inputMessage, Map<String, Object> hints) 从接口复制的说明:HttpMessageReaderRead from the input message and decode to a single object.- 指定者:
readMono在接口中HttpMessageReader<cn.taketoday.util.MultiValueMap<String,Part>> - 参数:
elementType- the type of objects in the stream which must have been previously checked viaHttpMessageReader.canRead(ResolvableType, MediaType)inputMessage- the message to read fromhints- additional information about how to read and decode the input- 返回:
- the decoded object
-
toMultiValueMap
-
toList
-