How do I determine if client's internet connection is down?
<p>When I do a <a href="http://docs.oracle.com/javase/7/docs/api/java/net/URLConnection.html#connect%28%29" rel="nofollow">java.net.URLConnection.connect()</a> it gives me <a href="http://docs.oracle.com/javase/7/docs/api/java/net/UnknownHostException.html" rel="nofollow">java.net.UnknownHostException</a> when the server is down.</p>

<p>However, I've found out that if my internet connection is down, the function also throws me a <a href="http://docs.oracle.com/javase/7/docs/api/java/net/UnknownHostException.html" rel="nofollow">java.net.UnknownHostException</a>.</p>

<p>So how do I determine whether it is a problem with the server (server down) or a problem with the client (my internet connection is down) ?</p>
