Package org.jboss.resteasy.plugins.providers

## 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>`, `AsyncBufferedMessageBodyWriter<Document>`, `AsyncMessageBodyWriter<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>
      implements AsyncBufferedMessageBodyWriter<Document>

  Provider that reads and writes org.w3c.dom.Document.
  Version:
    $Revision: $
  Author:
    Solomon Duskis

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DocumentProvider()` |
    `DocumentProvider​(ResteasyConfiguration config)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `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)` |
    `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)` |
    `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`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.jboss.resteasy.core.messagebody.AsyncBufferedMessageBodyWriter

      `asyncWriteTo`

    - ### Methods inherited from interface javax.ws.rs.ext.MessageBodyWriter

      `getSize`

- - ### Constructor Detail

    - #### DocumentProvider

          public DocumentProvider()

    - #### DocumentProvider

          public DocumentProvider​(@Context
                                  ResteasyConfiguration config)

  - ### Method Detail

    - #### isReadable

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

      Specified by:
        `isReadable` in interface `javax.ws.rs.ext.MessageBodyReader<Document>`

    - #### 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

      Specified by:
        `readFrom` in interface `javax.ws.rs.ext.MessageBodyReader<Document>`
      Throws:
        `IOException`
        `javax.ws.rs.WebApplicationException`

    - #### isWriteable

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

      Specified by:
        `isWriteable` in interface `javax.ws.rs.ext.MessageBodyWriter<Document>`

    - #### 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

      Specified by:
        `writeTo` in interface `javax.ws.rs.ext.MessageBodyWriter<Document>`
      Throws:
        `IOException`
        `javax.ws.rs.WebApplicationException`