Class MultipartMixedHttpMessageConverter
- java.lang.Object
-
- de.hybris.platform.customerticketingc4cintegration.facade.MultipartMixedHttpMessageConverter
-
- All Implemented Interfaces:
org.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<java.lang.String,?>>
public class MultipartMixedHttpMessageConverter extends java.lang.Object implements org.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<java.lang.String,?>>Custom HTTP message converter for Multipart mixed mode
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classMultipartMixedHttpMessageConverter.MultipartHttpOutputMessageImplementation ofHttpOutputMessageused to write a MIME multipart.
-
Field Summary
Fields Modifier and Type Field Description protected static byte[]MULTIPART_CHARSThe pool of ASCII chars to be used for generating a multipart boundary.
-
Constructor Summary
Constructors Constructor Description MultipartMixedHttpMessageConverter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddContentTypeHeader(java.io.OutputStream os, byte[] changeset)protected voidaddEncodingHeader(java.io.OutputStream os)booleancanRead(java.lang.Class clazz, org.springframework.http.MediaType mediaType)booleancanWrite(java.lang.Class clazz, org.springframework.http.MediaType mediaType)protected static byte[]generateMultipartBoundary()protected org.springframework.http.HttpEntity<?>getHttpEntity(java.lang.Object part)java.util.ListgetSupportedMediaTypes()org.springframework.util.MultiValueMap<java.lang.String,?>read(java.lang.Class val, org.springframework.http.HttpInputMessage inputMessage)protected ODataErrorretrieveJsonError(java.lang.String jsonToCheck)voidwrite(org.springframework.util.MultiValueMap<java.lang.String,?> values, org.springframework.http.MediaType mediaType, org.springframework.http.HttpOutputMessage outputMessage)protected voidwriteBoundary(java.io.OutputStream os, byte[] boundary)protected static voidwriteEnd(java.io.OutputStream os, byte[] changeset, byte[] boundary)protected voidwriteMultipart(org.springframework.util.MultiValueMap<java.lang.String,java.lang.Object> parts, org.springframework.http.HttpOutputMessage outputMessage)protected static voidwriteNewLine(java.io.OutputStream os)protected voidwritePart(org.springframework.http.HttpEntity<?> partEntity, java.io.OutputStream os)protected voidwriteParts(java.io.OutputStream os, org.springframework.util.MultiValueMap<java.lang.String,java.lang.Object> parts, byte[] changeset)
-
-
-
Method Detail
-
write
public void write(org.springframework.util.MultiValueMap<java.lang.String,?> values, org.springframework.http.MediaType mediaType, org.springframework.http.HttpOutputMessage outputMessage) throws java.io.IOException, org.springframework.http.converter.HttpMessageNotWritableException- Specified by:
writein interfaceorg.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<java.lang.String,?>>- Throws:
java.io.IOExceptionorg.springframework.http.converter.HttpMessageNotWritableException
-
writeMultipart
protected void writeMultipart(org.springframework.util.MultiValueMap<java.lang.String,java.lang.Object> parts, org.springframework.http.HttpOutputMessage outputMessage) throws java.io.IOException- Throws:
java.io.IOException
-
writeParts
protected void writeParts(java.io.OutputStream os, org.springframework.util.MultiValueMap<java.lang.String,java.lang.Object> parts, byte[] changeset) throws java.io.IOException- Throws:
java.io.IOException
-
addEncodingHeader
protected void addEncodingHeader(java.io.OutputStream os) throws java.io.IOException- Throws:
java.io.IOException
-
addContentTypeHeader
protected void addContentTypeHeader(java.io.OutputStream os, byte[] changeset) throws java.io.IOException- Throws:
java.io.IOException
-
writePart
protected void writePart(org.springframework.http.HttpEntity<?> partEntity, java.io.OutputStream os) throws java.io.IOException- Throws:
java.io.IOException
-
generateMultipartBoundary
protected static byte[] generateMultipartBoundary()
-
getHttpEntity
protected org.springframework.http.HttpEntity<?> getHttpEntity(java.lang.Object part)
-
writeBoundary
protected void writeBoundary(java.io.OutputStream os, byte[] boundary) throws java.io.IOException- Throws:
java.io.IOException
-
writeEnd
protected static void writeEnd(java.io.OutputStream os, byte[] changeset, byte[] boundary) throws java.io.IOException- Throws:
java.io.IOException
-
writeNewLine
protected static void writeNewLine(java.io.OutputStream os) throws java.io.IOException- Throws:
java.io.IOException
-
canWrite
public boolean canWrite(java.lang.Class clazz, org.springframework.http.MediaType mediaType)- Specified by:
canWritein interfaceorg.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<java.lang.String,?>>
-
getSupportedMediaTypes
public java.util.List getSupportedMediaTypes()
- Specified by:
getSupportedMediaTypesin interfaceorg.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<java.lang.String,?>>
-
canRead
public boolean canRead(java.lang.Class clazz, org.springframework.http.MediaType mediaType)- Specified by:
canReadin interfaceorg.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<java.lang.String,?>>
-
read
public org.springframework.util.MultiValueMap<java.lang.String,?> read(java.lang.Class val, org.springframework.http.HttpInputMessage inputMessage) throws java.io.IOException, org.springframework.http.converter.HttpMessageNotReadableException- Specified by:
readin interfaceorg.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<java.lang.String,?>>- Throws:
java.io.IOExceptionorg.springframework.http.converter.HttpMessageNotReadableException
-
retrieveJsonError
protected ODataError retrieveJsonError(java.lang.String jsonToCheck)
-
-