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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classImplementation ofHttpOutputMessageused to write a MIME multipart. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static byte[]The pool of ASCII chars to be used for generating a multipart boundary. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddContentTypeHeader(OutputStream os, byte[] changeset) protected voidbooleanbooleanprotected static byte[]protected org.springframework.http.HttpEntity<?>getHttpEntity(Object part) org.springframework.util.MultiValueMap<String,?> protected ODataErrorretrieveJsonError(String jsonToCheck) voidwrite(org.springframework.util.MultiValueMap<String, ?> values, org.springframework.http.MediaType mediaType, org.springframework.http.HttpOutputMessage outputMessage) protected voidwriteBoundary(OutputStream os, byte[] boundary) protected static voidwriteEnd(OutputStream os, byte[] changeset, byte[] boundary) protected voidwriteMultipart(org.springframework.util.MultiValueMap<String, Object> parts, org.springframework.http.HttpOutputMessage outputMessage) protected static voidprotected voidwritePart(org.springframework.http.HttpEntity<?> partEntity, OutputStream os) protected voidwriteParts(OutputStream os, org.springframework.util.MultiValueMap<String, Object> parts, byte[] changeset) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.http.converter.HttpMessageConverter
getSupportedMediaTypes
-
Field Details
-
MULTIPART_CHARS
protected static byte[] MULTIPART_CHARSThe 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:
writein interfaceorg.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<String,?>> - Throws:
IOExceptionorg.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
- Throws:
IOException
-
addContentTypeHeader
- Throws:
IOException
-
writePart
protected void writePart(org.springframework.http.HttpEntity<?> partEntity, OutputStream os) throws IOException - Throws:
IOException
-
generateMultipartBoundary
protected static byte[] generateMultipartBoundary() -
getHttpEntity
-
writeBoundary
- Throws:
IOException
-
writeEnd
protected static void writeEnd(OutputStream os, byte[] changeset, byte[] boundary) throws IOException - Throws:
IOException
-
writeNewLine
- Throws:
IOException
-
canWrite
- Specified by:
canWritein interfaceorg.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<String,?>>
-
getSupportedMediaTypes
- Specified by:
getSupportedMediaTypesin interfaceorg.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<String,?>>
-
canRead
- Specified by:
canReadin interfaceorg.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:
readin interfaceorg.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<String,?>> - Throws:
IOExceptionorg.springframework.http.converter.HttpMessageNotReadableException
-
retrieveJsonError
-