Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

get file path from url ?

 
Miran Cvenkel
Ranch Hand
Posts: 202
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


after redirections in behind ... url.openConnection... opens the following file:



How to get that path from url ?

 
Miran Cvenkel
Ranch Hand
Posts: 202
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the answer to this is casting urlConnection as HttpURLConnection

something like this:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic