Constructor and Description |
---|
MultiPartWriter(javax.ws.rs.ext.Providers providers) |
Modifier and Type | Method and Description |
---|---|
long |
getSize(MultiPart entity,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
void |
writeTo(MultiPart entity,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> headers,
OutputStream stream)
Write the entire list of body parts to the output stream, using the
appropriate provider implementation to serialize each body part's entity.
|
public MultiPartWriter(@Context javax.ws.rs.ext.Providers providers)
public long getSize(MultiPart entity, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<MultiPart>
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<MultiPart>
public void writeTo(MultiPart entity, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> headers, OutputStream stream) throws IOException, javax.ws.rs.WebApplicationException
Write the entire list of body parts to the output stream, using the appropriate provider implementation to serialize each body part's entity.
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<MultiPart>
entity
- The MultiPart
instance to writetype
- The class of the object to be written (i.e. MultiPart
.class)genericType
- The type of object to be writtenannotations
- Annotations on the resource method that returned this objectmediaType
- Media type (multipart/*
) of this entityheaders
- Mutable map of HTTP headers for the entire responsestream
- Output stream to which the entity should be writtenIOException
- if an I/O error occursjavax.ws.rs.WebApplicationException
- if an HTTP error response
needs to be produced (only effective if the response is not committed yet)Copyright © 2013 Oracle Corporation. All rights reserved.