|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xnap.commons.util.NetHelper
public class NetHelper
Provides a set of static methods for common network tasks.
| Constructor Summary | |
|---|---|
NetHelper()
|
|
| Method Summary | |
|---|---|
static void |
disableHttpProxy()
Disables the use of a http proxy. |
static void |
disableSocksProxy()
Disables the use of a socks proxy. |
static void |
enableHttpProxy(String host,
int port)
Enables the use of a http proxy at host:port. |
static void |
enableSocksProxy(String host,
int port)
Enables the use of a socks proxy at host:port. |
static String |
getErrorMessage(IOException e)
Returns a sensible error message. |
static long |
ipToLongHiFirst(byte[] address)
|
static String |
toIPAddressBigEndian(long ip)
Converts ip from an integer value to a dotted string
representation. |
static String |
toIPAddressLittleEndian(long ip)
Converts ip from an integer value to a dotted string
representation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NetHelper()
| Method Detail |
|---|
public static void enableSocksProxy(String host,
int port)
host:port.
host - hostname of the proxyport - port of the proxypublic static void disableSocksProxy()
public static void enableHttpProxy(String host,
int port)
host:port.
host - hostname of the proxyport - port of the proxypublic static void disableHttpProxy()
public static String getErrorMessage(IOException e)
public static long ipToLongHiFirst(byte[] address)
public static String toIPAddressLittleEndian(long ip)
ip from an integer value to a dotted string
representation.
public static String toIPAddressBigEndian(long ip)
ip from an integer value to a dotted string
representation.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||