In automatic mode, the favicon of the site that the user has entered should be downloaded. For example, I introduce http://google.com/ . Next, extract from the head link to the shortcut icon . Further I connect the link of the user and the link to an icon. For google, it looks like this: http://google.com/images/branding/product/ico/googleg_lodp.ico .

But. There is no file in this path. Throws FileNotFoundException .

Tell me how to be?

I am writing in Java.

  • 3
    She is in http://www.google.com/images/branding/product/ico/googleg_lodp.ico .... maybe you need to go through the option not only subdomain.domain but also www.subdomain.domain - Alexey Shimansky
  • @ AlekseyShimansky joke is that the URL class writes an error if you add www - Tsyklop
  • Insert the code you wrote into the question so that you can analyze what it is like or not - Alexey Shimansky
  • @ Alexey Shimansky everything. figured out. replace // with //www. - Tsyklop

0