openConnection() throws an IOException, of which FileNotFoundException
is a subclass. It has been that way for a decade or so. Whoever made
that decision may or may not be alive at this time, and most likely is
not on this list. Moreover, Android's implementation of these classes
comes from the Apache Harmony project -- you may wish to ask them if
they know more about the rationale behind the decision.

On Tue, Nov 9, 2010 at 6:46 PM, cindy <[email protected]> wrote:
> 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

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

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

Reply via email to