Class MessageConverterUtils


  • public abstract class MessageConverterUtils
    extends Object
    Message conversion utility methods.
    Author:
    David Turanski, Gary Russell, Ilayaperumal Gopinathan
    • Field Detail

      • X_JAVA_OBJECT

        public static final org.springframework.util.MimeType X_JAVA_OBJECT
        A general MimeType for Java Types.
      • X_JAVA_SERIALIZED_OBJECT

        public static final org.springframework.util.MimeType X_JAVA_SERIALIZED_OBJECT
        A general MimeType for a Java serialized byte array.
    • Constructor Detail

      • MessageConverterUtils

        public MessageConverterUtils()
    • Method Detail

      • getJavaTypeForJavaObjectContentType

        public static Class<?> getJavaTypeForJavaObjectContentType​(org.springframework.util.MimeType contentType)
        Get the java Object type for the MimeType X_JAVA_OBJECT.
        Parameters:
        contentType - content type
        Returns:
        the class for the content type.
      • javaObjectMimeType

        public static org.springframework.util.MimeType javaObjectMimeType​(Class<?> clazz)
        Build the conventional MimeType for a java object.
        Parameters:
        clazz - the java type
        Returns:
        the MIME type
      • getMimeType

        public static org.springframework.util.MimeType getMimeType​(String contentTypeString)