Class CustomMimeTypeConverter

  • All Implemented Interfaces:
    org.springframework.core.convert.converter.Converter<String,​org.springframework.util.MimeType>

    public class CustomMimeTypeConverter
    extends Object
    implements org.springframework.core.convert.converter.Converter<String,​org.springframework.util.MimeType>
    A custom converter for MimeType that accepts a plain java class name as a shorthand for application/x-java-object;type=the.qualified.ClassName.
    Author:
    Eric Bottard, David Turanski
    • Constructor Detail

      • CustomMimeTypeConverter

        public CustomMimeTypeConverter()
    • Method Detail

      • convert

        public org.springframework.util.MimeType convert​(String source)
        Specified by:
        convert in interface org.springframework.core.convert.converter.Converter<String,​org.springframework.util.MimeType>