Class ReaderProvider

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyReader<java.io.Reader>, javax.ws.rs.ext.MessageBodyWriter<java.io.Reader>

    @Deprecated
    @Provider
    public class ReaderProvider
    extends AbstractProvider<java.io.Reader>
    Deprecated.
    Will be removed in next minor release.
    This ProviderWrapper is used to read directly from a Reader.
    See Also:
    BufferedReaderProvider
    • Constructor Summary

      Constructors 
      Constructor Description
      ReaderProvider()
      Deprecated.
       
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      (package private) static java.io.Reader getReader​(java.io.InputStream entityStream)
      Deprecated.
      Returns a Reader wrapping the given entity stream, with respect to the CharacterSet of the entity of the current Request, or UTF-8 if no character set was given or if it is not available
      long getSize​(java.io.Reader t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
      Deprecated.
      Returns the size of the given objects.
      java.io.Reader readFrom​(java.lang.Class<java.io.Reader> 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)
      Deprecated.
       
      protected java.lang.Class<?> supportedClass()
      Deprecated.
      Returns the class object supported by this provider.
      void writeTo​(java.io.Reader reader, 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)
      Deprecated.
       
      • Methods inherited from class java.lang.Object

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

      • ReaderProvider

        public ReaderProvider()
        Deprecated.
    • Method Detail

      • getReader

        static java.io.Reader getReader​(java.io.InputStream entityStream)
        Deprecated.
        Returns a Reader wrapping the given entity stream, with respect to the CharacterSet of the entity of the current Request, or UTF-8 if no character set was given or if it is not available
      • getSize

        public long getSize​(java.io.Reader t,
                            java.lang.Class<?> type,
                            java.lang.reflect.Type genericType,
                            java.lang.annotation.Annotation[] annotations,
                            javax.ws.rs.core.MediaType mediaType)
        Deprecated.
        Description copied from class: AbstractProvider
        Returns the size of the given objects.
        Specified by:
        getSize in interface javax.ws.rs.ext.MessageBodyWriter<java.io.Reader>
        Specified by:
        getSize in class AbstractProvider<java.io.Reader>
        Parameters:
        t - the object to check the size
        Returns:
        the size of the object, or -1, if it is not direct readable from the object.
        See Also:
        javax.ws.rs.ext.MessageBodyWriter#getSize(java.lang.Object)
      • readFrom

        public java.io.Reader readFrom​(java.lang.Class<java.io.Reader> 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
        Deprecated.
        Specified by:
        readFrom in interface javax.ws.rs.ext.MessageBodyReader<java.io.Reader>
        Specified by:
        readFrom in class AbstractProvider<java.io.Reader>
        genericType - The generic Type to convert to.
        annotations - the annotations of the artefact to convert to
        Throws:
        java.io.IOException
        See Also:
        MessageBodyReader#readFrom(Class, Type, MediaType, Annotation[], MultivaluedMap, InputStream)
      • supportedClass

        protected java.lang.Class<?> supportedClass()
        Deprecated.
        Description copied from class: AbstractProvider
        Returns the class object supported by this provider.
        Overrides:
        supportedClass in class AbstractProvider<java.io.Reader>
        Returns:
        the class object supported by this provider.
      • writeTo

        public void writeTo​(java.io.Reader reader,
                            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
        Deprecated.
        Specified by:
        writeTo in interface javax.ws.rs.ext.MessageBodyWriter<java.io.Reader>
        Specified by:
        writeTo in class AbstractProvider<java.io.Reader>
        Throws:
        java.io.IOException
        See Also:
        MessageBodyWriter#writeTo(Object, Type, Annotation[], MediaType, MultivaluedMap, OutputStream)