public Object readFrom(Class<Object> cls, Type type, Annotation[] anns, MediaType mt, MultivaluedMap<String, String> headers, InputStream is) throws IOException, WebApplicationException { boolean isFeed = isFeedRequested(mt); if (isFeed) { return readFromFeedOrEntry(cls, mt, headers, is); } AtomEntryProvider p = new AtomEntryProvider(); p.setAutodetectCharset(autodetectCharset); Entry entry = p.readFrom(Entry.class, Entry.class, new Annotation[]{}, mt, headers, is); return readFromEntry(entry, cls); }
@SuppressWarnings("unchecked") public WebClientDeliverer(String deliveryAddress) { Validate.notEmpty(deliveryAddress, "deliveryAddress is empty or null"); List<?> providers = Arrays.asList(new AtomFeedProvider(), new AtomEntryProvider()); wc = WebClient.create(deliveryAddress, providers); }
public Object readFrom(Class<Object> cls, Type type, Annotation[] anns, MediaType mt, MultivaluedMap<String, String> headers, InputStream is) throws IOException, WebApplicationException { boolean isFeed = isFeedRequested(mt); if (isFeed) { return readFromFeedOrEntry(cls, mt, headers, is); } AtomEntryProvider p = new AtomEntryProvider(); p.setAutodetectCharset(autodetectCharset); Entry entry = p.readFrom(Entry.class, Entry.class, new Annotation[]{}, mt, headers, is); return readFromEntry(entry, cls); }
public Object readFrom(Class<Object> cls, Type type, Annotation[] anns, MediaType mt, MultivaluedMap<String, String> headers, InputStream is) throws IOException, WebApplicationException { boolean isFeed = isFeedRequested(mt); if (isFeed) { return readFromFeedOrEntry(cls, mt, headers, is); } else { AtomEntryProvider p = new AtomEntryProvider(); p.setAutodetectCharset(autodetectCharset); Entry entry = p.readFrom(Entry.class, Entry.class, new Annotation[]{}, mt, headers, is); return readFromEntry(entry, cls); } }