Class MultipartMixedHttpMessageConverter

java.lang.Object
de.hybris.platform.customerticketingc4cintegration.facade.MultipartMixedHttpMessageConverter
All Implemented Interfaces:
org.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<String,?>>

public class MultipartMixedHttpMessageConverter extends Object implements org.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<String,?>>
Custom HTTP message converter for Multipart mixed mode
  • Field Details

    • MULTIPART_CHARS

      protected static byte[] MULTIPART_CHARS
      The pool of ASCII chars to be used for generating a multipart boundary.
  • Constructor Details

    • MultipartMixedHttpMessageConverter

      public MultipartMixedHttpMessageConverter()
  • Method Details

    • write

      public void write(org.springframework.util.MultiValueMap<String,?> values, org.springframework.http.MediaType mediaType, 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
    • writeMultipart

      protected void writeMultipart(org.springframework.util.MultiValueMap<String,Object> parts, org.springframework.http.HttpOutputMessage outputMessage) throws IOException
      Throws:
      IOException
    • writeParts

      protected void writeParts(OutputStream os, org.springframework.util.MultiValueMap<String,Object> parts, byte[] changeset) throws IOException
      Throws:
      IOException
    • addEncodingHeader

      protected void addEncodingHeader(OutputStream os) throws IOException
      Throws:
      IOException
    • addContentTypeHeader

      protected void addContentTypeHeader(OutputStream os, byte[] changeset) throws IOException
      Throws:
      IOException
    • writePart

      protected void writePart(org.springframework.http.HttpEntity<?> partEntity, OutputStream os) throws IOException
      Throws:
      IOException
    • generateMultipartBoundary

      protected static byte[] generateMultipartBoundary()
    • getHttpEntity

      protected org.springframework.http.HttpEntity<?> getHttpEntity(Object part)
    • writeBoundary

      protected void writeBoundary(OutputStream os, byte[] boundary) throws IOException
      Throws:
      IOException
    • writeEnd

      protected static void writeEnd(OutputStream os, byte[] changeset, byte[] boundary) throws IOException
      Throws:
      IOException
    • writeNewLine

      protected static void writeNewLine(OutputStream os) throws IOException
      Throws:
      IOException
    • 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,?>>
    • getSupportedMediaTypes

      public List 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,?>>
    • read

      public org.springframework.util.MultiValueMap<String,?> read(Class val, 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
    • retrieveJsonError

      protected ODataError retrieveJsonError(String jsonToCheck)