This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am assuming that you want to know if your user is connected to the internet or not ... I would try to get the HTTP headers from a known stable server (www.sun.com, www.cnn.com) ... if you get the headers, they are online, if not, they are not ... you may want to try one or two different servers if the result is negative, just in case the server is down. Hope this helps