Package org.jboss.resteasy.core.messagebody

Examples of org.jboss.resteasy.core.messagebody.ReaderUtility


   protected <T2> Object readFrom(Class<T2> type, Type genericType,
                                  MediaType media, Annotation[] annotations)
   {
      try
      {
         ReaderUtility reader = new ReaderUtility(providerFactory,
                 messageBodyReaderInterceptors)
         {
            @Override
            public RuntimeException createReaderNotFound(Type genericType,
                                                         MediaType mediaType)
            {
               return createResponseFailure(format(
                       "Unable to find a MessageBodyReader of content-type %s and type %s",
                       mediaType, genericType));
            }
         };
         return reader.doRead(type, genericType == null ? type : genericType,
                 media, this.annotations, getHeaders(), streamFactory
                         .getInputStream());
      }
      catch (IOException e)
      {
View Full Code Here


   protected <T2> Object readFrom(Class<T2> type, Type genericType,
                                  MediaType media, Annotation[] annotations)
   {
      try
      {
         ReaderUtility reader = new ReaderUtility(providerFactory,
                 messageBodyReaderInterceptors)
         {
            @Override
            public RuntimeException createReaderNotFound(Type genericType,
                                                         MediaType mediaType)
            {
               return createResponseFailure(format(
                       "Unable to find a MessageBodyReader of content-type %s and type %s",
                       mediaType, genericType));
            }
         };
         return reader.doRead(type, genericType == null ? type : genericType,
                 media, this.annotations, getHeaders(), streamFactory
                         .getInputStream());
      }
      catch (IOException e)
      {
View Full Code Here

      this.genericType = genericType;
      this.annotations = annotations;
      MessageBodyReaderInterceptor[] interceptors = factory
            .getServerMessageBodyReaderInterceptorRegistry().bind(
                  declaringClass, target);
      this.readerUtility = new ReaderUtility(factory, interceptors)
      {
         public RuntimeException createReaderNotFound(Type genericType, MediaType mediaType)
         {
            return new BadRequestException(
                  "Could not find message body reader for type: "
View Full Code Here

   protected <T2> Object readFrom(Class<T2> type, Type genericType,
                                  MediaType media, Annotation[] annotations)
   {
      try
      {
         ReaderUtility reader = new ReaderUtility(providerFactory,
                 messageBodyReaderInterceptors)
         {
            @Override
            public RuntimeException createReaderNotFound(Type genericType,
                                                         MediaType mediaType)
            {
               return createResponseFailure(format(
                       "Unable to find a MessageBodyReader of content-type %s and type %s",
                       mediaType, genericType));
            }
         };
         return reader.doRead(type, genericType == null ? type : genericType,
                 media, this.annotations, getHeaders(), streamFactory
                         .getInputStream());
      }
      catch (IOException e)
      {
View Full Code Here

TOP

Related Classes of org.jboss.resteasy.core.messagebody.ReaderUtility

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.