Class MultipartAwareFormHttpMessageConverter

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

public class MultipartAwareFormHttpMessageConverter extends Object implements org.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<String,?>>
An HttpMessageConverter implementation that delegates to an instance of AllEncompassingFormHttpMessageConverter while adding the capability to read multipart/form-data content in an HTTP request.
Since:
2.0
  • Constructor Details

    • MultipartAwareFormHttpMessageConverter

      public MultipartAwareFormHttpMessageConverter()
  • Method Details

    • setCharset

      public void setCharset(Charset charset)
      Sets the character set used for writing form data.
      Parameters:
      charset - The charset.
    • setMultipartFileReader

      public void setMultipartFileReader(MultipartFileReader<?> multipartFileReader)
      Specify the MultipartFileReader to use when reading MultipartFile content.
      Parameters:
      multipartFileReader - The multipart file reader.
    • getSupportedMediaTypes

      public List<org.springframework.http.MediaType> getSupportedMediaTypes()
      Specified by:
      getSupportedMediaTypes in interface org.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<String,?>>
    • canRead

      public boolean canRead(Class<?> clazz, org.springframework.http.MediaType mediaType)
      Specified by:
      canRead in interface org.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<String,?>>
    • canWrite

      public boolean canWrite(Class<?> clazz, org.springframework.http.MediaType mediaType)
      Specified by:
      canWrite in interface org.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<String,?>>
    • read

      public org.springframework.util.MultiValueMap<String,?> read(Class<? extends org.springframework.util.MultiValueMap<String,?>> clazz, org.springframework.http.HttpInputMessage inputMessage) throws IOException, org.springframework.http.converter.HttpMessageNotReadableException
      Specified by:
      read in interface org.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<String,?>>
      Throws:
      IOException
      org.springframework.http.converter.HttpMessageNotReadableException
    • write

      public void write(org.springframework.util.MultiValueMap<String,?> map, org.springframework.http.MediaType contentType, org.springframework.http.HttpOutputMessage outputMessage) throws IOException, org.springframework.http.converter.HttpMessageNotWritableException
      Specified by:
      write in interface org.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<String,?>>
      Throws:
      IOException
      org.springframework.http.converter.HttpMessageNotWritableException