Class IIOImageProvider

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyReader<javax.imageio.IIOImage>, javax.ws.rs.ext.MessageBodyWriter<javax.imageio.IIOImage>

    @Provider
    @Consumes("image/*")
    @Produces("image/*")
    public class IIOImageProvider
    extends AbstractEntityProvider<javax.imageio.IIOImage>
    Version:
    $Revision:$
    • Method Summary

      All 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)  
      boolean isWriteable​(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)  
      javax.imageio.IIOImage readFrom​(java.lang.Class<javax.imageio.IIOImage> 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)  
      void writeTo​(javax.imageio.IIOImage t, 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)  
      • Methods inherited from class java.lang.Object

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

      • IIOImageProvider

        public IIOImageProvider()
    • Method Detail

      • isReadable

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

        public javax.imageio.IIOImage readFrom​(java.lang.Class<javax.imageio.IIOImage> 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
        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)
        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.imageio.IIOImage t,
                            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
        Parameters:
        t -
        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)