|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.fenyo.gnetwatch.GenericTools
public class GenericTools
General methods not dedicated to a particular application.
| Field Summary | |
|---|---|
private static Log |
log
|
| Constructor Summary | |
|---|---|
GenericTools()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
formatNumericString(Config config,
java.lang.String value)
|
static java.lang.String |
getFullExceptionStackTrace(java.lang.Throwable ex)
Returns the full stack trace. |
static java.lang.String |
getNetFromAddress(java.lang.String addr_str)
Returns the class A/B/C network address containing an IP address. |
static java.lang.String |
inet4AddressToString(java.net.Inet4Address addr)
Converts an IP address to its string representation. |
static java.lang.String |
inet6AddressToString(java.net.Inet6Address addr)
Converts an IP address to its string representation. |
static void |
initLogEngine(Config config)
Configure the global logging rules. |
static java.net.Inet4Address |
stringToInet4Address(java.lang.String str)
Converts a string to an Inet4Address. |
static java.net.Inet6Address |
stringToInet6Address(java.lang.String str)
Converts a string to an Inet6Address. |
static void |
substractGraph(java.util.List<Pair<VisualElement,VisualElement>> g1,
java.util.List<Pair<VisualElement,VisualElement>> g2)
Removes the part of a graph that is covered by another graph. |
static short |
unsignedByteToShort(byte ub)
Converts a unsigned byte (encoded into a java signed byte) to a positive signed short. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static Log log
| Constructor Detail |
|---|
public GenericTools()
| Method Detail |
|---|
public static void initLogEngine(Config config)
config - Reference to the general configuration instance.
public static java.net.Inet4Address stringToInet4Address(java.lang.String str)
throws java.net.UnknownHostException
str - source string.
java.net.UnknownHostException
public static java.net.Inet6Address stringToInet6Address(java.lang.String str)
throws java.net.UnknownHostException
str - source string.
java.net.UnknownHostExceptionpublic static short unsignedByteToShort(byte ub)
ub - unsigned byte encoded into a java signed byte.
public static java.lang.String inet4AddressToString(java.net.Inet4Address addr)
addr - ipv4 address.
public static java.lang.String inet6AddressToString(java.net.Inet6Address addr)
addr - ipv6 address.
public static java.lang.String getNetFromAddress(java.lang.String addr_str)
addr_str - IPv4 address.
public static void substractGraph(java.util.List<Pair<VisualElement,VisualElement>> g1,
java.util.List<Pair<VisualElement,VisualElement>> g2)
addr - g1 initial graph.addr - g2 graph defining links to remove to the initial graph.public static java.lang.String getFullExceptionStackTrace(java.lang.Throwable ex)
ex - exception.
public static java.lang.String formatNumericString(Config config,
java.lang.String value)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||