Class DocumentProvider

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyReader<org.w3c.dom.Document>, javax.ws.rs.ext.MessageBodyWriter<org.w3c.dom.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<org.w3c.dom.Document>
    Provider that reads and writes org.w3c.dom.Document
    Version:
    $Revision: $
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isReadable​(java.lang.Class<?> clazz, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotation, javax.ws.rs.core.MediaType mediaType)  
      boolean isWriteable​(java.lang.Class<?> clazz, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotation, javax.ws.rs.core.MediaType mediaType)  
      org.w3c.dom.Document readFrom​(java.lang.Class<org.w3c.dom.Document> clazz, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> headers, java.io.InputStream input)  
      void writeTo​(org.w3c.dom.Document document, java.lang.Class<?> clazz, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotation, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.Object> headers, java.io.OutputStream output)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • transformerFactory

        private final javax.xml.transform.TransformerFactory transformerFactory
      • documentBuilder

        private final javax.xml.parsers.DocumentBuilderFactory documentBuilder
      • expandEntityReferences

        private boolean expandEntityReferences
      • enableSecureProcessingFeature

        private boolean enableSecureProcessingFeature
      • disableDTDs

        private boolean disableDTDs
    • Method Detail

      • isReadable

        public boolean isReadable​(java.lang.Class<?> clazz,
                                  java.lang.reflect.Type type,
                                  java.lang.annotation.Annotation[] annotation,
                                  javax.ws.rs.core.MediaType mediaType)
      • readFrom

        public org.w3c.dom.Document readFrom​(java.lang.Class<org.w3c.dom.Document> clazz,
                                             java.lang.reflect.Type type,
                                             java.lang.annotation.Annotation[] annotations,
                                             javax.ws.rs.core.MediaType mediaType,
                                             javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> headers,
                                             java.io.InputStream input)
                                      throws java.io.IOException,
                                             javax.ws.rs.WebApplicationException
        Throws:
        java.io.IOException
        javax.ws.rs.WebApplicationException
      • isWriteable

        public boolean isWriteable​(java.lang.Class<?> clazz,
                                   java.lang.reflect.Type type,
                                   java.lang.annotation.Annotation[] annotation,
                                   javax.ws.rs.core.MediaType mediaType)
      • writeTo

        public void writeTo​(org.w3c.dom.Document document,
                            java.lang.Class<?> clazz,
                            java.lang.reflect.Type type,
                            java.lang.annotation.Annotation[] annotation,
                            javax.ws.rs.core.MediaType mediaType,
                            javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.Object> headers,
                            java.io.OutputStream output)
                     throws java.io.IOException,
                            javax.ws.rs.WebApplicationException
        Throws:
        java.io.IOException
        javax.ws.rs.WebApplicationException