@Provider @Consumes(value={"multipart/related","multipart/mixed","multipart/alternative","multipart/form-data"}) @Produces(value={"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 and Description |
---|
MultipartProvider() |
Modifier and Type | Method and 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) |
getBus, getConsumeMediaTypes, getEnableBuffering, getEnableStreaming, getProduceMediaTypes, init, isPayloadEmpty, isPayloadEmpty, reportEmptyContentLength, setBus, setConsumeMediaTypes, setEnableBuffering, setEnableStreaming, setProduceMediaTypes
public void setMessageContext(MessageContext context)
public void setAttachmentDirectory(String dir)
public void setAttachmentThreshold(String threshold)
public void setAttachmentMaxSize(String maxSize)
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)
isReadable
in interface javax.ws.rs.ext.MessageBodyReader<Object>
protected void checkContentLength()
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
readFrom
in interface javax.ws.rs.ext.MessageBodyReader<Object>
IOException
javax.ws.rs.WebApplicationException
public long getSize(Object t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<Object>
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<Object>
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
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<Object>
IOException
javax.ws.rs.WebApplicationException
Apache CXF