Class DataSourceProvider

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyReader<javax.activation.DataSource>, javax.ws.rs.ext.MessageBodyWriter<javax.activation.DataSource>

    @Provider
    @Consumes("*/*")
    @Produces("*/*")
    public class DataSourceProvider
    extends AbstractEntityProvider<javax.activation.DataSource>
    Version:
    $Revision:$
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isReadable​(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
      FIXME Comment this
      boolean isWriteable​(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
      FIXME Comment this
      static javax.activation.DataSource readDataSource​(java.io.InputStream in, javax.ws.rs.core.MediaType mediaType)  
      javax.activation.DataSource readFrom​(java.lang.Class<javax.activation.DataSource> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> httpHeaders, java.io.InputStream entityStream)
      FIXME Comment this
      void writeTo​(javax.activation.DataSource dataSource, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.Object> httpHeaders, java.io.OutputStream entityStream)
      FIXME Comment this
      • 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 javax.activation.DataSource readDataSource​(java.io.InputStream in,
                                                                 javax.ws.rs.core.MediaType mediaType)
                                                          throws java.io.IOException
        Parameters:
        in -
        mediaType -
        Returns:
        Throws:
        java.io.IOException
      • isReadable

        public boolean isReadable​(java.lang.Class<?> type,
                                  java.lang.reflect.Type genericType,
                                  java.lang.annotation.Annotation[] annotations,
                                  javax.ws.rs.core.MediaType mediaType)
        FIXME Comment this
        Parameters:
        type -
        genericType -
        annotations -
        Returns:
        See Also:
        MessageBodyReader
      • readFrom

        public javax.activation.DataSource readFrom​(java.lang.Class<javax.activation.DataSource> type,
                                                    java.lang.reflect.Type genericType,
                                                    java.lang.annotation.Annotation[] annotations,
                                                    javax.ws.rs.core.MediaType mediaType,
                                                    javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> httpHeaders,
                                                    java.io.InputStream entityStream)
                                             throws java.io.IOException
        FIXME Comment this
        Parameters:
        type -
        genericType -
        annotations -
        mediaType -
        httpHeaders -
        entityStream -
        Returns:
        Throws:
        java.io.IOException
        javax.ws.rs.WebApplicationException
        See Also:
        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​(java.lang.Class<?> type,
                                   java.lang.reflect.Type genericType,
                                   java.lang.annotation.Annotation[] annotations,
                                   javax.ws.rs.core.MediaType mediaType)
        FIXME Comment this
        Parameters:
        type -
        genericType -
        annotations -
        Returns:
        See Also:
        javax.ws.rs.ext.MessageBodyWriter#isWriteable(java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[])
      • writeTo

        public void writeTo​(javax.activation.DataSource dataSource,
                            java.lang.Class<?> type,
                            java.lang.reflect.Type genericType,
                            java.lang.annotation.Annotation[] annotations,
                            javax.ws.rs.core.MediaType mediaType,
                            javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.Object> httpHeaders,
                            java.io.OutputStream entityStream)
                     throws java.io.IOException
        FIXME Comment this
        Parameters:
        dataSource -
        type -
        genericType -
        annotations -
        mediaType -
        httpHeaders -
        entityStream -
        Throws:
        java.io.IOException
        javax.ws.rs.WebApplicationException
        See Also:
        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)