Class RestAbstractHttpMessageConverter<T>

java.lang.Object
org.springframework.http.converter.AbstractHttpMessageConverter<T>
com.emc.documentum.rest.wire.RestAbstractHttpMessageConverter<T>
All Implemented Interfaces:
org.springframework.http.converter.HttpMessageConverter<T>
Direct Known Subclasses:
AnnotatedJsonMessageConverter, AnnotatedXmlMessageConverter

public abstract class RestAbstractHttpMessageConverter<T> extends org.springframework.http.converter.AbstractHttpMessageConverter<T>
This class is used to override the addDefaultHeaders to support MediaType.APPLICATION_OCTET_STREAM content-type header, as the Spring does not support it since 4.2.3
  • Field Summary

    Fields inherited from class org.springframework.http.converter.AbstractHttpMessageConverter

    logger
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Construct an RestAbstractHttpMessageConverter with no supported media types.
    protected
    RestAbstractHttpMessageConverter(org.springframework.http.MediaType supportedMediaType)
    Construct an RestAbstractHttpMessageConverter with one supported media type.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addDefaultHeaders(org.springframework.http.HttpHeaders headers, T t, org.springframework.http.MediaType contentType)
    Add default headers to the output message.

    Methods inherited from class org.springframework.http.converter.AbstractHttpMessageConverter

    canRead, canRead, canWrite, canWrite, getContentLength, getDefaultCharset, getDefaultContentType, getSupportedMediaTypes, read, readInternal, setDefaultCharset, setSupportedMediaTypes, supports, write, writeInternal

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.http.converter.HttpMessageConverter

    getSupportedMediaTypes
  • Constructor Details

    • RestAbstractHttpMessageConverter

      protected RestAbstractHttpMessageConverter()
      Construct an RestAbstractHttpMessageConverter with no supported media types.
      See Also:
      • AbstractHttpMessageConverter.setSupportedMediaTypes(java.util.List<org.springframework.http.MediaType>)
    • RestAbstractHttpMessageConverter

      protected RestAbstractHttpMessageConverter(org.springframework.http.MediaType supportedMediaType)
      Construct an RestAbstractHttpMessageConverter with one supported media type.
      Parameters:
      supportedMediaType - the supported media type
  • Method Details

    • addDefaultHeaders

      protected void addDefaultHeaders(org.springframework.http.HttpHeaders headers, T t, org.springframework.http.MediaType contentType) throws IOException
      Add default headers to the output message. This implementation delegates to AbstractHttpMessageConverter.getDefaultContentType(Object) if a content type was not provided, calls AbstractHttpMessageConverter.getContentLength(T, org.springframework.http.MediaType), and sets the corresponding headers
      Overrides:
      addDefaultHeaders in class org.springframework.http.converter.AbstractHttpMessageConverter<T>
      Throws:
      IOException