public class NetworkUtilities
extends java.lang.Object
Constructor and Description |
---|
NetworkUtilities() |
Modifier and Type | Method and Description |
---|---|
static boolean |
checkConnection()
Checks if a Internet connection can be established
|
static boolean |
checkConnection(java.net.URL url)
Checks if a Internet connection to a specific Server can be established
|
static boolean |
checkConnection(java.net.URL url,
int timeout,
boolean showWaitingDialog)
Checks if a Internet connection to a specific Server can be established
|
static java.lang.String[] |
getConnectionCheckUrls() |
static int |
getTimeDifferenceSeconds(java.lang.String serverName)
get the time difference from a NTP server
|
public static boolean checkConnection()
public static boolean checkConnection(java.net.URL url)
url
- check this Serverpublic static boolean checkConnection(java.net.URL url, int timeout, boolean showWaitingDialog)
url
- check this Servertimeout
- the timeout for the check in milliseconds.showWaitingDialog
- true
if a waiting dialog should be shown, false
otherwise.public static int getTimeDifferenceSeconds(java.lang.String serverName)
serverName
- public static java.lang.String[] getConnectionCheckUrls()
TV-Browser 3.4.1.0, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)