Class DocumentProvider
java.lang.Object
org.jboss.resteasy.plugins.providers.AbstractEntityProvider<Document>
org.jboss.resteasy.plugins.providers.DocumentProvider
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<Document>
,javax.ws.rs.ext.MessageBodyWriter<Document>
@Provider
@Produces({"text/xml","text/*+xml","application/xml","application/*+xml"})
@Consumes({"text/xml","text/*+xml","application/xml","application/*+xml"})
public class DocumentProvider
extends AbstractEntityProvider<Document>
Provider that reads and writes org.w3c.dom.Document
- Version:
- $Revision: $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private final DocumentBuilderFactory
private boolean
private boolean
private final TransformerFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
isReadable
(Class<?> clazz, Type type, Annotation[] annotation, javax.ws.rs.core.MediaType mediaType) boolean
isWriteable
(Class<?> clazz, Type type, Annotation[] annotation, javax.ws.rs.core.MediaType mediaType) readFrom
(Class<Document> clazz, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, String> headers, InputStream input) void
writeTo
(Document document, Class<?> clazz, Type type, Annotation[] annotation, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, Object> headers, OutputStream output) Methods inherited from class org.jboss.resteasy.plugins.providers.AbstractEntityProvider
getSize
-
Field Details
-
transformerFactory
-
documentBuilder
-
expandEntityReferences
private boolean expandEntityReferences -
enableSecureProcessingFeature
private boolean enableSecureProcessingFeature -
disableDTDs
private boolean disableDTDs
-
-
Constructor Details
-
DocumentProvider
-
-
Method Details
-
isReadable
public boolean isReadable(Class<?> clazz, Type type, Annotation[] annotation, javax.ws.rs.core.MediaType mediaType) -
readFrom
public Document readFrom(Class<Document> clazz, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, String> headers, InputStream input) throws IOException, javax.ws.rs.WebApplicationException- Throws:
IOException
javax.ws.rs.WebApplicationException
-
isWriteable
public boolean isWriteable(Class<?> clazz, Type type, Annotation[] annotation, javax.ws.rs.core.MediaType mediaType) -
writeTo
public void writeTo(Document document, Class<?> clazz, Type type, Annotation[] annotation, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, Object> headers, OutputStream output) throws IOException, javax.ws.rs.WebApplicationException- Throws:
IOException
javax.ws.rs.WebApplicationException
-