Package org.jboss.resteasy.plugins.providers.jaxb

## Class CollectionProvider

- java.lang.Object
- - org.jboss.resteasy.plugins.providers.jaxb.CollectionProvider

- All Implemented Interfaces:
    `javax.ws.rs.ext.MessageBodyReader<Object>`, `javax.ws.rs.ext.MessageBodyWriter<Object>`, `AsyncBufferedMessageBodyWriter<Object>`, `AsyncMessageBodyWriter<Object>`
  Direct Known Subclasses:
    `FastInfosetCollectionProvider`

      @Provider
      @Produces({"application/xml","application/*+xml","text/xml","text/*+xml"})
      @Consumes({"application/xml","application/*+xml","text/xml","text/*+xml"})
      public class CollectionProvider
      extends Object
      implements javax.ws.rs.ext.MessageBodyReader<Object>, AsyncBufferedMessageBodyWriter<Object>

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected javax.ws.rs.ext.Providers` | `providers` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CollectionProvider()` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static String` | `getCharset​(javax.ws.rs.core.MediaType mediaType)` |
    `protected JAXBContextFinder` | `getFinder​(javax.ws.rs.core.MediaType type)` |
    `Object` | `getJAXBObject​(JAXBContextFinder finder, javax.ws.rs.core.MediaType mediaType, Class<?> clazz, Element element)` |
    `long` | `getSize​(Object entry, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)` |
    `boolean` | `isDisableDTDs()` |
    `boolean` | `isDisableExternalEntities()` |
    `boolean` | `isEnableSecureProcessingFeature()` |
    `boolean` | `isReadable​(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)` |
    `protected boolean` | `isWrapped​(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)` |
    `boolean` | `isWriteable​(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)` |
    `protected boolean` | `needsSecurity()` |
    `Object` | `readFrom​(Class<Object> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,​String> httpHeaders, InputStream entityStream)` |
    `void` | `setDisableDTDs​(boolean disableDTDs)` |
    `void` | `setDisableExternalEntities​(boolean disableExternalEntities)` |
    `void` | `setEnableSecureProcessingFeature​(boolean enableSecureProcessingFeature)` |
    `void` | `writeTo​(Object entry, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,​Object> httpHeaders, OutputStream entityStream)` |

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

- - ### Field Detail

    - #### providers

          @Context
          protected javax.ws.rs.ext.Providers providers

  - ### Constructor Detail

    - #### CollectionProvider

          public CollectionProvider()

  - ### Method Detail

    - #### getFinder

          protected JAXBContextFinder getFinder​(javax.ws.rs.core.MediaType type)

    - #### isReadable

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

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

    - #### isWrapped

          protected boolean isWrapped​(Class<?> type,
                                      Type genericType,
                                      Annotation[] annotations,
                                      javax.ws.rs.core.MediaType mediaType)

    - #### getJAXBObject

          public Object getJAXBObject​(JAXBContextFinder finder,
                                      javax.ws.rs.core.MediaType mediaType,
                                      Class<?> clazz,
                                      Element element)
                               throws JAXBException

      Throws:
        `JAXBException`

    - #### readFrom

          public Object readFrom​(Class<Object> type,
                                 Type genericType,
                                 Annotation[] annotations,
                                 javax.ws.rs.core.MediaType mediaType,
                                 javax.ws.rs.core.MultivaluedMap<String,​String> httpHeaders,
                                 InputStream entityStream)
                          throws IOException,
                                 javax.ws.rs.WebApplicationException

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

    - #### isWriteable

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

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

    - #### getSize

          public long getSize​(Object entry,
                              Class<?> type,
                              Type genericType,
                              Annotation[] annotations,
                              javax.ws.rs.core.MediaType mediaType)

      Specified by:
        `getSize` in interface `javax.ws.rs.ext.MessageBodyWriter<Object>`

    - #### writeTo

          public void writeTo​(Object entry,
                              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

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

    - #### isDisableExternalEntities

          public boolean isDisableExternalEntities()

    - #### setDisableExternalEntities

          public void setDisableExternalEntities​(boolean disableExternalEntities)

    - #### isEnableSecureProcessingFeature

          public boolean isEnableSecureProcessingFeature()

    - #### setEnableSecureProcessingFeature

          public void setEnableSecureProcessingFeature​(boolean enableSecureProcessingFeature)

    - #### isDisableDTDs

          public boolean isDisableDTDs()

    - #### setDisableDTDs

          public void setDisableDTDs​(boolean disableDTDs)

    - #### getCharset

          public static String getCharset​(javax.ws.rs.core.MediaType mediaType)

    - #### needsSecurity

          protected boolean needsSecurity()