public class MultipartAwareFormHttpMessageConverter
extends java.lang.Object
implements org.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<java.lang.String,?>>
HttpMessageConverter
implementation that delegates to an instance of
XmlAwareFormHttpMessageConverter
while adding the capability to read
multipart/form-data
content in an HTTP request.Constructor and Description |
---|
MultipartAwareFormHttpMessageConverter() |
Modifier and Type | Method and Description |
---|---|
boolean |
canRead(java.lang.Class<?> clazz,
org.springframework.http.MediaType mediaType) |
boolean |
canWrite(java.lang.Class<?> clazz,
org.springframework.http.MediaType mediaType) |
java.util.List<org.springframework.http.MediaType> |
getSupportedMediaTypes() |
org.springframework.util.MultiValueMap<java.lang.String,?> |
read(java.lang.Class<? extends org.springframework.util.MultiValueMap<java.lang.String,?>> clazz,
org.springframework.http.HttpInputMessage inputMessage) |
void |
setCharset(java.nio.charset.Charset charset)
Sets the character set used for writing form data.
|
void |
setMultipartFileReader(MultipartFileReader<?> multipartFileReader)
Specify the
MultipartFileReader to use when reading MultipartFile content. |
void |
write(org.springframework.util.MultiValueMap<java.lang.String,?> map,
org.springframework.http.MediaType contentType,
org.springframework.http.HttpOutputMessage outputMessage) |
public MultipartAwareFormHttpMessageConverter()
public void setCharset(java.nio.charset.Charset charset)
public void setMultipartFileReader(MultipartFileReader<?> multipartFileReader)
MultipartFileReader
to use when reading MultipartFile
content.public java.util.List<org.springframework.http.MediaType> getSupportedMediaTypes()
getSupportedMediaTypes
in interface org.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<java.lang.String,?>>
public boolean canRead(java.lang.Class<?> clazz, org.springframework.http.MediaType mediaType)
canRead
in interface org.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<java.lang.String,?>>
public boolean canWrite(java.lang.Class<?> clazz, org.springframework.http.MediaType mediaType)
canWrite
in interface org.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<java.lang.String,?>>
public org.springframework.util.MultiValueMap<java.lang.String,?> read(java.lang.Class<? extends org.springframework.util.MultiValueMap<java.lang.String,?>> clazz, org.springframework.http.HttpInputMessage inputMessage) throws java.io.IOException, org.springframework.http.converter.HttpMessageNotReadableException
read
in interface org.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<java.lang.String,?>>
java.io.IOException
org.springframework.http.converter.HttpMessageNotReadableException
public void write(org.springframework.util.MultiValueMap<java.lang.String,?> map, org.springframework.http.MediaType contentType, org.springframework.http.HttpOutputMessage outputMessage) throws java.io.IOException, org.springframework.http.converter.HttpMessageNotWritableException
write
in interface org.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<java.lang.String,?>>
java.io.IOException
org.springframework.http.converter.HttpMessageNotWritableException