public abstract class AbstractStaxProvider<T> extends BaseProvider<T>
desiredType, habitat, HEADER_DEBUG, JSONP_CALLBACK, requestHeaders, supportedMediaTypes, uriInfo| Constructor and Description |
|---|
AbstractStaxProvider(Class desiredType,
javax.ws.rs.core.MediaType... mediaType) |
| Modifier and Type | Method and Description |
|---|---|
String |
getContent(T proxy) |
protected boolean |
isGivenTypeWritable(Class<?> type,
Type genericType)
Overwrite this if you need different test of type compatibility.
|
protected abstract void |
writeContentToStream(T proxy,
StreamWriter wr)
Marshalling implementation here.
|
void |
writeTo(T proxy,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream)
Faster with direct stream writing
|
canShowDeprecatedItems, canShowHiddenCommands, getCallBackJSONP, getResourceLinks, getResourceLinks, getSize, getXmlCommandLinks, isDebug, isWriteablepublic AbstractStaxProvider(Class desiredType, javax.ws.rs.core.MediaType... mediaType)
protected boolean isGivenTypeWritable(Class<?> type, Type genericType)
BaseProviderisGivenTypeWritable in class BaseProvider<T>protected abstract void writeContentToStream(T proxy, StreamWriter wr) throws Exception
proxy - object to marshalwr - STaX for marshalingXMLStreamExceptionIOExceptionExceptionpublic String getContent(T proxy)
getContent in class BaseProvider<T>public void writeTo(T proxy, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<T>writeTo in class BaseProvider<T>IOExceptionjavax.ws.rs.WebApplicationExceptionCopyright © 2019. All rights reserved.