Package org.apache.cxf.jaxrs.provider
Class MultipartProvider
- java.lang.Object
-
- org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider
-
- org.apache.cxf.jaxrs.provider.MultipartProvider
-
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<Object>
,javax.ws.rs.ext.MessageBodyWriter<Object>
@Provider @Consumes({"multipart/related","multipart/mixed","multipart/alternative","multipart/form-data"}) @Produces({"multipart/related","multipart/mixed","multipart/alternative","multipart/form-data"}) public class MultipartProvider extends AbstractConfigurableProvider implements javax.ws.rs.ext.MessageBodyReader<Object>, javax.ws.rs.ext.MessageBodyWriter<Object>
-
-
Constructor Summary
Constructors Constructor Description MultipartProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkContentLength()
long
getSize(Object t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
boolean
isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)
boolean
isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)
Object
readFrom(Class<Object> c, Type t, Annotation[] anns, javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<String,String> headers, InputStream is)
void
setAttachmentDirectory(String dir)
void
setAttachmentMaxSize(String maxSize)
void
setAttachmentThreshold(String threshold)
void
setMessageContext(MessageContext context)
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.AbstractConfigurableProvider
getBus, getConsumeMediaTypes, getEnableBuffering, getEnableStreaming, getProduceMediaTypes, init, isPayloadEmpty, isPayloadEmpty, reportEmptyContentLength, setBus, setConsumeMediaTypes, setEnableBuffering, setEnableStreaming, setProduceMediaTypes
-
-
-
-
Method Detail
-
setMessageContext
public void setMessageContext(MessageContext context)
-
setAttachmentDirectory
public void setAttachmentDirectory(String dir)
-
setAttachmentThreshold
public void setAttachmentThreshold(String threshold)
-
setAttachmentMaxSize
public void setAttachmentMaxSize(String maxSize)
-
isReadable
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)
- Specified by:
isReadable
in interfacejavax.ws.rs.ext.MessageBodyReader<Object>
-
checkContentLength
protected void checkContentLength()
-
readFrom
public Object readFrom(Class<Object> c, Type t, Annotation[] anns, javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<String,String> headers, InputStream is) throws IOException, javax.ws.rs.WebApplicationException
- Specified by:
readFrom
in interfacejavax.ws.rs.ext.MessageBodyReader<Object>
- Throws:
IOException
javax.ws.rs.WebApplicationException
-
getSize
public long getSize(Object t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
getSize
in interfacejavax.ws.rs.ext.MessageBodyWriter<Object>
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)
- Specified by:
isWriteable
in interfacejavax.ws.rs.ext.MessageBodyWriter<Object>
-
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 interfacejavax.ws.rs.ext.MessageBodyWriter<Object>
- Throws:
IOException
javax.ws.rs.WebApplicationException
-
-