org.jboss.resteasy.plugins.providers

## Class DataSourceProvider

- java.lang.Object
- - org.jboss.resteasy.plugins.providers.AbstractEntityProvider<DataSource>
  - - org.jboss.resteasy.plugins.providers.DataSourceProvider

- All Implemented Interfaces:
    MessageBodyReader<DataSource>, MessageBodyWriter<DataSource>

      @Provider
      @Consumes(value="*/*")
      @Produces(value="*/*")
      public class DataSourceProvider
      extends AbstractEntityProvider<DataSource>

  Version:
    $Revision:$
  Author:
    Ryan J. McDonough

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `DataSourceProvider.SequencedDataSource`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataSourceProvider()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)` FIXME Comment this
    `boolean` | `isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)` FIXME Comment this
    `static DataSource` | `readDataSource(InputStream in, MediaType mediaType)`
    `DataSource` | `readFrom(Class<DataSource> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,String> httpHeaders, InputStream entityStream)` FIXME Comment this
    `void` | `writeTo(DataSource dataSource, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)` FIXME Comment this

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

- - ### Constructor Detail

    - #### DataSourceProvider

          public DataSourceProvider()

  - ### Method Detail

    - #### readDataSource

          public static DataSource readDataSource(InputStream in,
                                  MediaType mediaType)
                                           throws IOException

      Parameters:
        `in` -
        `mediaType` -
      Returns:
      Throws:
        `IOException`

    - #### isReadable

          public boolean isReadable(Class<?> type,
                           Type genericType,
                           Annotation[] annotations,
                           MediaType mediaType)

      FIXME Comment this
      Parameters:
        `type` -
        `genericType` -
        `annotations` -
        `mediaType` - the media type of the HTTP entity, if one is not specified in the request then `application/octet-stream` is used.
      Returns:
      See Also:
        `MessageBodyReader`

    - #### readFrom

          public DataSource readFrom(Class<DataSource> type,
                            Type genericType,
                            Annotation[] annotations,
                            MediaType mediaType,
                            MultivaluedMap<String,String> httpHeaders,
                            InputStream entityStream)
                              throws IOException

      FIXME Comment this
      Parameters:
        `type` -
        `genericType` -
        `annotations` -
        `mediaType` -
        `httpHeaders` -
        `entityStream` -
      Returns:
      Throws:
        `IOException`
        `WebApplicationException`
      See Also:
        `javax.ws.rs.ext.MessageBodyReader#readFrom(java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap, java.io.InputStream)`

    - #### isWriteable

          public boolean isWriteable(Class<?> type,
                            Type genericType,
                            Annotation[] annotations,
                            MediaType mediaType)

      FIXME Comment this
      Parameters:
        `type` -
        `genericType` -
        `annotations` -
        `mediaType` - the media type of the HTTP entity.
      Returns:
      See Also:
        `javax.ws.rs.ext.MessageBodyWriter#isWriteable(java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[])`

    - #### writeTo

          public void writeTo(DataSource dataSource,
                     Class<?> type,
                     Type genericType,
                     Annotation[] annotations,
                     MediaType mediaType,
                     MultivaluedMap<String,Object> httpHeaders,
                     OutputStream entityStream)
                       throws IOException

      FIXME Comment this
      Parameters:
        `dataSource` -
        `type` -
        `genericType` -
        `annotations` -
        `mediaType` -
        `httpHeaders` -
        `entityStream` -
      Throws:
        `IOException`
        `WebApplicationException`
      See Also:
        `javax.ws.rs.ext.MessageBodyWriter#writeTo(java.lang.Object, java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap, java.io.OutputStream)`

Copyright © 2014. All Rights Reserved.