Package org.jboss.resteasy.spi

Examples of org.jboss.resteasy.spi.ReaderException


         input.setProviders(providers);
         return input;
      }
      catch (Exception e)
      {
         throw new ReaderException(e);
      }

   }
View Full Code Here


         input.setProviders(providers);
         return input;
      }
      catch (MessagingException e)
      {
         throw new ReaderException(e);
      }

   }
View Full Code Here

         {
            throw (ReaderException) e;
         }
         else
         {
            throw new ReaderException(e);
         }
      }
   }
View Full Code Here

         {
            throw (ReaderException) e;
         }
         else
         {
            throw new ReaderException(e);
         }
      }
      finally
      {
         ResteasyProviderFactory.popContextData(Providers.class);
View Full Code Here

      }
      catch (YAMLException ye)
      {
         logger.debug("Failed to decode Yaml: {0}", ye.getMessage());
         throw new ReaderException("Failed to decode Yaml", ye);
      }
      catch (Exception e)
      {
         logger.debug("Failed to decode Yaml: {0}", e.getMessage());
         throw new ReaderException("Failed to decode Yaml", e);
      }


   }
View Full Code Here

         {
            throw (ReaderException) e;
         }
         else
         {
            throw new ReaderException(e);
         }
      }
   }
View Full Code Here

         DataSource ds = readDataSource(entityStream, mediaType);
         return new MimeMultipart(ds);
      }
      catch (MessagingException e)
      {
         throw new ReaderException(e);
      }
   }
View Full Code Here

      {
         obj = type.newInstance();
      }
      catch (InstantiationException e)
      {
         throw new ReaderException(e.getCause());
      }
      catch (IllegalAccessException e)
      {
         throw new ReaderException(e);
      }

      boolean hasInputStream = false;

      Class<?> theType = type;
      while (theType != null && !theType.equals(Object.class))
      {
         if (setFields(theType, input, obj))
         {
            hasInputStream = true;
         }
         theType = theType.getSuperclass();
      }

      for (Method method : type.getMethods())
      {
         if (method.isAnnotationPresent(FormParam.class)
                 && method.getName().startsWith("set")
                 && method.getParameterTypes().length == 1)
         {
            FormParam param = method.getAnnotation(FormParam.class);
            List<InputPart> list = input.getFormDataMap()
                    .get(param.value());
            if (list == null || list.isEmpty())
               continue;
            InputPart part = list.get(0);
            // if (part == null) throw new
            // LoggableFailure("Unable to find @FormParam in multipart: " +
            // param.value());
            if (part == null)
               continue;
            Class<?> type1 = method.getParameterTypes()[0];
            if (InputStream.class.equals(type1))
            {
               hasInputStream = true;
            }
            Object data = part.getBody(type1,
                    method.getGenericParameterTypes()[0]);
            try
            {
               method.invoke(obj, data);
            }
            catch (IllegalAccessException e)
            {
               throw new ReaderException(e);
            }
            catch (InvocationTargetException e)
            {
               throw new ReaderException(e.getCause());
            }
         }
      }
      if (!hasInputStream)
      {
View Full Code Here

            {
               field.set(obj, data);
            }
            catch (IllegalAccessException e)
            {
               throw new ReaderException(e);
            }
         }
      }
      return hasInputStream;
   }
View Full Code Here

         documentBuilder.setFeature("http://apache.org/xml/features/disallow-doctype-decl", disableDTDs);
         return documentBuilder.newDocumentBuilder().parse(input);
      }
      catch (Exception e)
      {
         throw new ReaderException(e);
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.resteasy.spi.ReaderException

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.