Class ContentDispositionMultipartProvider

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyReader<Object>, javax.ws.rs.ext.MessageBodyWriter<Object>

    public class ContentDispositionMultipartProvider
    extends org.apache.cxf.jaxrs.provider.MultipartProvider
    This solves the following issue:
    • CXF doesn't send through the Content-Disposition header in the regular MultipartProvider. This is a bug in apache cxf.
    Author:
    moffrob
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void writeTo​(Object obj, Class<?> type, Type genericType, Annotation[] anns, javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<String,​Object> headers, OutputStream os)  
      • Methods inherited from class org.apache.cxf.jaxrs.provider.MultipartProvider

        checkContentLength, getSize, isReadable, isWriteable, readFrom, setAttachmentDirectory, setAttachmentMaxSize, setAttachmentThreshold, setMessageContext
      • Methods inherited from class org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider

        getBus, getConsumeMediaTypes, getEnableBuffering, getEnableStreaming, getProduceMediaTypes, init, isPayloadEmpty, isPayloadEmpty, reportEmptyContentLength, setBus, setConsumeMediaTypes, setEnableBuffering, setEnableStreaming, setProduceMediaTypes
    • Constructor Detail

      • ContentDispositionMultipartProvider

        public ContentDispositionMultipartProvider()
    • Method Detail

      • writeTo

        public void writeTo​(Object obj,
                            Class<?> type,
                            Type genericType,
                            Annotation[] anns,
                            javax.ws.rs.core.MediaType mt,
                            javax.ws.rs.core.MultivaluedMap<String,​Object> headers,
                            OutputStream os)
                     throws IOException,
                            javax.ws.rs.WebApplicationException
        Specified by:
        writeTo in interface javax.ws.rs.ext.MessageBodyWriter<Object>
        Overrides:
        writeTo in class org.apache.cxf.jaxrs.provider.MultipartProvider
        Throws:
        IOException
        javax.ws.rs.WebApplicationException