org.jboss.resteasy.core.messagebody
Class ReaderUtility

java.lang.Object
  extended by org.jboss.resteasy.core.messagebody.ReaderUtility

public abstract class ReaderUtility
extends Object

Utility for accessing RESTEasy's MessageBodyReader setup

Version:
$Revision: 1 $
Author:
Solomon Duskis

Constructor Summary
ReaderUtility()
           
ReaderUtility(ResteasyProviderFactory factory, MessageBodyReaderInterceptor[] interceptors)
           
 
Method Summary
abstract  RuntimeException createReaderNotFound(Type genericType, MediaType mediaType)
           
<T> T
doRead(Class<T> type, MediaType mediaType, InputStream is)
           
<T> T
doRead(Class<T> type, Type genericType, MediaType mediaType, Annotation[] annotations, MultivaluedMap<String,String> requestHeaders, InputStream inputStream)
           
<T> T
doRead(Class<T> type, Type genericType, MediaType mediaType, MultivaluedMap<String,String> requestHeaders, InputStream is)
           
 Object doRead(HttpRequest request, Class type, Type genericType, Annotation[] annotations, MediaType mediaType)
           
static
<T> T
read(Class<T> type, MediaType mediaType, byte[] buffer)
           
static
<T> T
read(Class<T> type, MediaType mt, InputStream is)
           
static
<T> T
read(Class<T> type, String contentType, byte[] buffer)
           
static
<T> T
read(Class<T> type, String contentType, String buffer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReaderUtility

public ReaderUtility()

ReaderUtility

public ReaderUtility(ResteasyProviderFactory factory,
                     MessageBodyReaderInterceptor[] interceptors)
Method Detail

read

public static <T> T read(Class<T> type,
                         String contentType,
                         String buffer)
              throws IOException
Throws:
IOException

read

public static <T> T read(Class<T> type,
                         String contentType,
                         byte[] buffer)
              throws IOException
Throws:
IOException

read

public static <T> T read(Class<T> type,
                         MediaType mediaType,
                         byte[] buffer)
              throws IOException
Throws:
IOException

read

public static <T> T read(Class<T> type,
                         MediaType mt,
                         InputStream is)
              throws IOException
Throws:
IOException

doRead

public <T> T doRead(Class<T> type,
                    MediaType mediaType,
                    InputStream is)
         throws IOException
Throws:
IOException

doRead

public <T> T doRead(Class<T> type,
                    Type genericType,
                    MediaType mediaType,
                    MultivaluedMap<String,String> requestHeaders,
                    InputStream is)
         throws IOException
Throws:
IOException

doRead

public Object doRead(HttpRequest request,
                     Class type,
                     Type genericType,
                     Annotation[] annotations,
                     MediaType mediaType)
              throws IOException
Throws:
IOException

doRead

public <T> T doRead(Class<T> type,
                    Type genericType,
                    MediaType mediaType,
                    Annotation[] annotations,
                    MultivaluedMap<String,String> requestHeaders,
                    InputStream inputStream)
         throws IOException
Throws:
IOException

createReaderNotFound

public abstract RuntimeException createReaderNotFound(Type genericType,
                                                      MediaType mediaType)


Copyright © 2011. All Rights Reserved.