FileNotFoundException in URL.openStream()
843790Apr 21 2009 — edited Apr 23 2009I created a URL object with some address, then, when I tried to perform openStream() to it, I got an exception that complained about a bit different url address- see my code below.
I don't understand who caused the framework to change the url address?, is it a proxy issue?
here is my code:
{color:#339966}URL pageUrl = new URL(http://cdn.<the rest of the address>/asg-006850_692.jpg);
BufferedInputStream reader = new BufferedInputStream(
pageUrl.openStream());
{color}
the second line throws the exception:
{color:#993300}java.io.FileNotFoundException: http://bitcast-a.v1.o1.fra1.bitgravity.com/break/<the same rest of the address>/asg-006850_692.jpg
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1303)
at java.net.URL.openStream(URL.java:1009){color}