Package com.sun.syndication.io

Examples of com.sun.syndication.io.SyndFeedInput.build()


        SyndFeed feed = null;
        // set the encoding?
        try {
            SyndFeedInput feedInput = new SyndFeedInput();
            InputSource input = new InputSource(stream);
            feed = feedInput.build(input);
        } catch (Exception e) {
            throw new TikaException(e.getMessage());
        }

        String feedLink = feed.getLink();
View Full Code Here


                                ". Reason :" +
                                method.getStatusLine());
            }
            InputStream response = method.getResponseBodyAsStream();
            SyndFeedInput input = new SyndFeedInput();
            SyndFeed feed = input.build(new XmlReader(response));
            retFeed = (Feed) cx.newObject(feedReaderObject, "Feed", new Object[0]);
            retFeed.setFeed(feed);
        } catch (SSLHandshakeException e) {
            if (e.getMessage().indexOf(
                    "sun.security.validator.ValidatorException: PKIX path building failed") > -1) {
View Full Code Here

                    .getClassLoader());
            c = getGmailConnection();
            c.setUrl(gmailFeedUrl);
            final URLConnection con = c.openConnection();
            final SyndFeedInput feedInput = new SyndFeedInput();
            final SyndFeed gmail = feedInput.build(new XmlReader(con));
            for (final Object entry : gmail.getEntries()) {
                if (entry instanceof SyndEntry) {
                    messages.add(new RssGmailMessage((SyndEntry) entry));
                }
            }
View Full Code Here

          final int rc = client.executeMethod(get);
          if (rc != HttpStatus.SC_OK) {
            throw new PortalException("HttpStatus:"+ rc+" url: " + xmlUri);
          }
          final InputStream in = get.getResponseBodyAsStream();
          feed = input.build(new XmlReader(in));
        } finally {
          get.releaseConnection();
        }
      } else {
      URL feedUrl;
View Full Code Here

          get.releaseConnection();
        }
      } else {
      URL feedUrl;
      feedUrl = new URL(xmlUri);
      feed = input.build(new XmlReader(feedUrl));
      }
    } catch (MalformedURLException e) {
      throw new PortalException(e);
    } catch (IllegalArgumentException e) {
      throw new PortalException(e);
View Full Code Here

                feed = feedInput.build(new XmlReader(new ByteArrayInputStream((byte[]) src)));

            }
            else if (src instanceof Document)
            {
                feed = feedInput.build((Document) src);

            }
            else if (src instanceof InputSource)
            {
                feed = feedInput.build((InputSource) src);
View Full Code Here

                feed = feedInput.build((Document) src);

            }
            else if (src instanceof InputSource)
            {
                feed = feedInput.build((InputSource) src);

            }
            else if (src instanceof File)
            {
                feed = feedInput.build((File) src);
View Full Code Here

                feed = feedInput.build((InputSource) src);

            }
            else if (src instanceof File)
            {
                feed = feedInput.build((File) src);

            }
            return feed;
        }
        catch (Exception e)
View Full Code Here

        SyndFeed feed = null;
        try
        {
            if (src instanceof String)
            {
                feed = feedInput.build(new StringReader(src.toString()));

            }
            else if (src instanceof InputStream)
            {
                feed = feedInput.build(new XmlReader((InputStream) src));
View Full Code Here

                feed = feedInput.build(new StringReader(src.toString()));

            }
            else if (src instanceof InputStream)
            {
                feed = feedInput.build(new XmlReader((InputStream) src));

            }
            else if (src instanceof byte[])
            {
                feed = feedInput.build(new XmlReader(new ByteArrayInputStream((byte[]) src)));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.