@Provider @Produces(value="application/xml") public class XmlCollectionWriter extends Object implements javax.ws.rs.ext.MessageBodyWriter<Object>
Modifier and Type | Field and Description |
---|---|
protected MarshallerRegistry |
m_marshallerRegistry
Marshaller registry to obtain element marshallers from.
|
Constructor and Description |
---|
XmlCollectionWriter()
Default constructor.
|
XmlCollectionWriter(MarshallerRegistry registry)
Construct an XmlCollectionWriter instance.
|
Modifier and Type | Method and Description |
---|---|
long |
getSize(Object col,
Class<?> clz,
Type type,
Annotation[] aAnnotation,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isWriteable(Class<?> clz,
Type type,
Annotation[] aAnnotation,
javax.ws.rs.core.MediaType mediaType) |
void |
writeTo(Object oCol,
Class<?> clz,
Type type,
Annotation[] aAnnotation,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
OutputStream stream) |
@Inject protected MarshallerRegistry m_marshallerRegistry
public XmlCollectionWriter()
public XmlCollectionWriter(MarshallerRegistry registry)
registry
- marshaller registry to usepublic boolean isWriteable(Class<?> clz, Type type, Annotation[] aAnnotation, javax.ws.rs.core.MediaType mediaType)
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<Object>
public long getSize(Object col, Class<?> clz, Type type, Annotation[] aAnnotation, javax.ws.rs.core.MediaType mediaType)
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<Object>
public void writeTo(Object oCol, Class<?> clz, Type type, Annotation[] aAnnotation, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream stream) throws IOException, javax.ws.rs.WebApplicationException
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<Object>
IOException
javax.ws.rs.WebApplicationException