util.io

## Class NetworkUtilities

- java.lang.Object
- - util.io.NetworkUtilities

-     public class NetworkUtilities
      extends java.lang.Object

  Network Helper Class with some utility functions
  Since:
    2.2
  Author:
    bodum

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NetworkUtilities()`

  - ### Method Summary

    Methods
    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

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NetworkUtilities

          public NetworkUtilities()

  - ### Method Detail

    - #### checkConnection

          public static boolean checkConnection()

      Checks if a Internet connection can be established
      Returns:
        true, if a connection can be established

    - #### checkConnection

          public static boolean checkConnection(java.net.URL url)

      Checks if a Internet connection to a specific Server can be established
      Parameters:
        `url` - check this Server
      Returns:
        true, if a connection can be established

    - #### checkConnection

          public static boolean checkConnection(java.net.URL url,
                                int timeout,
                                boolean showWaitingDialog)

      Checks if a Internet connection to a specific Server can be established
      Parameters:
        `url` - check this Server
        `timeout` - the timeout for the check in milliseconds.
        `showWaitingDialog` - `true` if a waiting dialog should be shown, `false` otherwise.
      Returns:
        true, if a connection can be established
      Since:
        3.4.1

    - #### getTimeDifferenceSeconds

          public static int getTimeDifferenceSeconds(java.lang.String serverName)

      get the time difference from a NTP server
      Parameters:
        `serverName` -
      Returns:
        time difference in seconds
      Since:
        2.6

    - #### getConnectionCheckUrls

          public static java.lang.String[] getConnectionCheckUrls()

TV-Browser 3.4.3, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)