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
public class MultipartProvider
- extends AbstractConfigurableProvider
- implements javax.ws.rs.ext.MessageBodyReader<Object>, javax.ws.rs.ext.MessageBodyWriter<Object>
Method Summary |
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, setBus, setConsumeMediaTypes, setEnableBuffering, setEnableStreaming, setProduceMediaTypes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultipartProvider
public MultipartProvider()
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 interface javax.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 interface javax.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 interface javax.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 interface javax.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 interface javax.ws.rs.ext.MessageBodyWriter<Object>
- Throws:
IOException
javax.ws.rs.WebApplicationException
Apache CXF