Try like this,
URL url = new URL("Your URL");
URLConnection conexion = url.openConnection();
conexion.setConnectTimeout(10000); // Don't forget to put a time limit
conexion.connect();
After timeout (10 secs for above mentioned example), It will through time out exception. So You can use it to check whether Internet access is available or not.