Tuesday, November 9, 2010

[android-developers] why HttpURLConnection return file not found for unexisting url?

Hi All,

I am using HttpURLConnection to open connection:

connectURL = new URL(Common.uploadUrl);
conn = (HttpURLConnection) connectURL.openConnection();

I just put some un-existing url there, I suspect it will through
exception as "can't find the site", however it throws
java.io.FIleNotFound :

11-09 15:34:55.645: WARN/System.err(939):
java.io.FileNotFoundException: http://test.122.com


Does anyone know why?

Thanks!

Cindy

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate