title: How do i get the url for an image from an object array
body: <p>I'm getting a list of URLs from a feed, how do i get desired urlfrom the list.</p>
  
  <p>I receive a list of URLs that i pass to an object, among these are url to an image it self, a thumbnail, information on type of file etc. </p>
  
  <pre><code>URL url = new URL("https://catalog.example.com/publicdomain/browse/en/recent.atom");
  XmlReader xmlReader = null;
  
  try {
  
    xmlReader = new XmlReader(url);
    SyndFeed feeder = new SyndFeedInput().build(xmlReader);
  
    for (Iterator iterator = feeder.getEntries().iterator(); iterator
        .hasNext();) {
      SyndEntry syndEntry = (SyndEntry) iterator.next();
  
  
      System.out.println(syndEntry.getAuthor());
      Object[] str = syndEntry.getLinks().toArray();
  
      System.out.println(str[3] );
  
    }
  } finally {
        if (xmlReader != null)
          xmlReader.close();
  }
  </code></pre>
  
  <p>When I use 'str[3]' the output is the following: </p>
  
  <pre><code>John Doe
  SyndLinkImpl.hreflang=null
  SyndLinkImpl.rel=http://opds-example.org/image/thumbnail
  SyndLinkImpl.length=0
  SyndLinkImpl.href=https://covers.example.net/book/6709.jpg
  SyndLinkImpl.title=null
  SyndLinkImpl.type=image/jpeg
  </code></pre>
  
  <p>I don;t want to put hardcode the index of the array because the feed can change.
  How do i alter my code to detect which index of the array has a url for type image and copy the url.
  I will like to use same approach to check which index has a url for content of type pdf.</p>
  
  <p>Thamls</p>