Class ReaderUtility


  • public abstract class ReaderUtility
    extends java.lang.Object
    Utility for accessing RESTEasy's MessageBodyReader setup
    Version:
    $Revision: 1 $
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract java.lang.RuntimeException createReaderNotFound​(java.lang.reflect.Type genericType, javax.ws.rs.core.MediaType mediaType)  
      <T> T doRead​(java.lang.Class<T> type, java.lang.reflect.Type genericType, javax.ws.rs.core.MediaType mediaType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> requestHeaders, java.io.InputStream inputStream)  
      <T> T doRead​(java.lang.Class<T> type, java.lang.reflect.Type genericType, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> requestHeaders, java.io.InputStream is)  
      <T> T doRead​(java.lang.Class<T> type, javax.ws.rs.core.MediaType mediaType, java.io.InputStream is)  
      java.lang.Object doRead​(HttpRequest request, java.lang.Class type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)  
      static <T> T read​(java.lang.Class<T> type, java.lang.String contentType, byte[] buffer)  
      static <T> T read​(java.lang.Class<T> type, java.lang.String contentType, java.lang.String buffer)  
      static <T> T read​(java.lang.Class<T> type, javax.ws.rs.core.MediaType mediaType, byte[] buffer)  
      static <T> T read​(java.lang.Class<T> type, javax.ws.rs.core.MediaType mt, java.io.InputStream is)  
      • Methods inherited from class java.lang.Object

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

      • interceptors

        private javax.ws.rs.ext.ReaderInterceptor[] interceptors
    • Constructor Detail

      • ReaderUtility

        public ReaderUtility()
      • ReaderUtility

        public ReaderUtility​(ResteasyProviderFactory factory,
                             javax.ws.rs.ext.ReaderInterceptor[] interceptors)
    • Method Detail

      • read

        public static <T> T read​(java.lang.Class<T> type,
                                 java.lang.String contentType,
                                 java.lang.String buffer)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • read

        public static <T> T read​(java.lang.Class<T> type,
                                 java.lang.String contentType,
                                 byte[] buffer)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • read

        public static <T> T read​(java.lang.Class<T> type,
                                 javax.ws.rs.core.MediaType mediaType,
                                 byte[] buffer)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • read

        public static <T> T read​(java.lang.Class<T> type,
                                 javax.ws.rs.core.MediaType mt,
                                 java.io.InputStream is)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • doRead

        public <T> T doRead​(java.lang.Class<T> type,
                            javax.ws.rs.core.MediaType mediaType,
                            java.io.InputStream is)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • doRead

        public <T> T doRead​(java.lang.Class<T> type,
                            java.lang.reflect.Type genericType,
                            javax.ws.rs.core.MediaType mediaType,
                            javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> requestHeaders,
                            java.io.InputStream is)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • doRead

        public java.lang.Object doRead​(HttpRequest request,
                                       java.lang.Class type,
                                       java.lang.reflect.Type genericType,
                                       java.lang.annotation.Annotation[] annotations,
                                       javax.ws.rs.core.MediaType mediaType)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • doRead

        public <T> T doRead​(java.lang.Class<T> type,
                            java.lang.reflect.Type genericType,
                            javax.ws.rs.core.MediaType mediaType,
                            java.lang.annotation.Annotation[] annotations,
                            javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> requestHeaders,
                            java.io.InputStream inputStream)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • createReaderNotFound

        public abstract java.lang.RuntimeException createReaderNotFound​(java.lang.reflect.Type genericType,
                                                                        javax.ws.rs.core.MediaType mediaType)