Class AbstractMessageConverter

    • Field Detail

      • charset

        protected Charset charset
    • Constructor Detail

      • AbstractMessageConverter

        protected AbstractMessageConverter()
      • AbstractMessageConverter

        protected AbstractMessageConverter​(MimeType supportedMimeType)
      • AbstractMessageConverter

        protected AbstractMessageConverter​(MimeType... supportedMimeTypes)
    • Method Detail

      • setSupportedMediaTypes

        public void setSupportedMediaTypes​(List<MimeType> supportedMimeTypes)
      • getCharset

        public Charset getCharset()
      • setCharset

        public void setCharset​(Charset charset)
      • supports

        protected boolean supports​(Class<?> clazz,
                                   MimeType mimeType)
        满足其中一个supports
        Parameters:
        clazz - 转换类型
        mimeType - 媒体类型
        Returns:
        支持标识
      • supports

        protected abstract boolean supports​(Class<?> clazz,
                                            byte[] content)
        满足其中一个supports
        Parameters:
        clazz - 转换类型
        content - 内容数据
        Returns:
        支持标识