org.springframework.integration.http.converter
Class MultipartAwareFormHttpMessageConverter

java.lang.Object
  extended by org.springframework.integration.http.converter.MultipartAwareFormHttpMessageConverter
All Implemented Interfaces:
HttpMessageConverter<MultiValueMap<java.lang.String,?>>

public class MultipartAwareFormHttpMessageConverter
extends java.lang.Object
implements HttpMessageConverter<MultiValueMap<java.lang.String,?>>

An HttpMessageConverter implementation that delegates to an instance of XmlAwareFormHttpMessageConverter while adding the capability to read multipart/form-data content in an HTTP request.

Since:
2.0

Constructor Summary
MultipartAwareFormHttpMessageConverter()
           
 
Method Summary
 boolean canRead(java.lang.Class<?> clazz, MediaType mediaType)
           
 boolean canWrite(java.lang.Class<?> clazz, MediaType mediaType)
           
 java.util.List<MediaType> getSupportedMediaTypes()
           
 MultiValueMap<java.lang.String,?> read(java.lang.Class<? extends MultiValueMap<java.lang.String,?>> clazz, 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(MultiValueMap<java.lang.String,?> map, MediaType contentType, HttpOutputMessage outputMessage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultipartAwareFormHttpMessageConverter

public MultipartAwareFormHttpMessageConverter()
Method Detail

setCharset

public void setCharset(java.nio.charset.Charset charset)
Sets the character set used for writing form data.


setMultipartFileReader

public void setMultipartFileReader(MultipartFileReader<?> multipartFileReader)
Specify the MultipartFileReader to use when reading MultipartFile content.


getSupportedMediaTypes

public java.util.List<MediaType> getSupportedMediaTypes()
Specified by:
getSupportedMediaTypes in interface HttpMessageConverter<MultiValueMap<java.lang.String,?>>

canRead

public boolean canRead(java.lang.Class<?> clazz,
                       MediaType mediaType)
Specified by:
canRead in interface HttpMessageConverter<MultiValueMap<java.lang.String,?>>

canWrite

public boolean canWrite(java.lang.Class<?> clazz,
                        MediaType mediaType)
Specified by:
canWrite in interface HttpMessageConverter<MultiValueMap<java.lang.String,?>>

read

public MultiValueMap<java.lang.String,?> read(java.lang.Class<? extends MultiValueMap<java.lang.String,?>> clazz,
                                              HttpInputMessage inputMessage)
                                       throws java.io.IOException,
                                              HttpMessageNotReadableException
Specified by:
read in interface HttpMessageConverter<MultiValueMap<java.lang.String,?>>
Throws:
java.io.IOException
HttpMessageNotReadableException

write

public void write(MultiValueMap<java.lang.String,?> map,
                  MediaType contentType,
                  HttpOutputMessage outputMessage)
           throws java.io.IOException,
                  HttpMessageNotWritableException
Specified by:
write in interface HttpMessageConverter<MultiValueMap<java.lang.String,?>>
Throws:
java.io.IOException
HttpMessageNotWritableException