@Produces(value={"application/xml","application/*+xml","text/xml","application/json","application/*+json"}) @Consumes(value={"application/xml","application/*+xml","text/xml","application/json","application/*+json"}) public class DOM4JProvider extends AbstractConfigurableProvider implements javax.ws.rs.ext.MessageBodyReader<org.dom4j.Document>, javax.ws.rs.ext.MessageBodyWriter<org.dom4j.Document>
Modifier and Type | Field and Description |
---|---|
static String |
SUPPRESS_XML_DECLARATION |
BUNDLE, LOG
Constructor and Description |
---|
DOM4JProvider() |
Modifier and Type | Method and Description |
---|---|
void |
convertToDOMAlways(boolean convert) |
protected Message |
getCurrentMessage() |
long |
getSize(org.dom4j.Document doc,
Class<?> cls,
Type type,
Annotation[] anns,
javax.ws.rs.core.MediaType mt) |
boolean |
isReadable(Class<?> cls,
Type type,
Annotation[] anns,
javax.ws.rs.core.MediaType mt) |
boolean |
isWriteable(Class<?> cls,
Type type,
Annotation[] anns,
javax.ws.rs.core.MediaType mt) |
org.dom4j.Document |
readFrom(Class<org.dom4j.Document> cls,
Type type,
Annotation[] anns,
javax.ws.rs.core.MediaType mt,
javax.ws.rs.core.MultivaluedMap<String,String> headers,
InputStream is) |
void |
setProviders(javax.ws.rs.ext.Providers providers) |
void |
writeTo(org.dom4j.Document doc,
Class<?> cls,
Type type,
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 static final String SUPPRESS_XML_DECLARATION
@Context public void setProviders(javax.ws.rs.ext.Providers providers)
public boolean isReadable(Class<?> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt)
isReadable
in interface javax.ws.rs.ext.MessageBodyReader<org.dom4j.Document>
public org.dom4j.Document readFrom(Class<org.dom4j.Document> cls, Type type, 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<org.dom4j.Document>
IOException
javax.ws.rs.WebApplicationException
public long getSize(org.dom4j.Document doc, Class<?> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt)
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<org.dom4j.Document>
public boolean isWriteable(Class<?> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt)
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<org.dom4j.Document>
public void writeTo(org.dom4j.Document doc, Class<?> cls, Type type, 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<org.dom4j.Document>
IOException
javax.ws.rs.WebApplicationException
protected Message getCurrentMessage()
public void convertToDOMAlways(boolean convert)
Apache CXF