|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttools.Converter
public class Converter
A tools class for converting from an unit into an other.
| Constructor Summary | |
|---|---|
Converter()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
bpsToString(double bps)
taken from avgBW.c |
static int[] |
byteIPArrToIntIPArr(byte[] ip)
Converts a byte[4] to an int[4]. |
static double |
colorToDouble(java.awt.Color c)
Converts a Color to its double value although an int representation would be enough (RGB). |
static int |
ipArrToInt(int[] ip)
Converts an int[4] to an integer. |
static java.lang.String |
ipArrtoString(int[] ipArr)
Converts an int[4] to a String e.g. |
static structIP |
ipArrToStructIP(int[] ip)
Converts an int[4] to a structIP |
static structIP[] |
proxiesToStructIPs(java.util.Vector<X2XProxy> proxies)
gets an structIP-array consisting of the IPs of the proxies |
static double |
scpStringToBps(java.lang.String s)
used for scp-output |
static double |
stringToBps(java.lang.String s)
taken from avgBW.c |
static int[] |
stringToIPArr(java.lang.String ip)
Converts a String e.g. |
static int[] |
structIPtoIPArr(structIP ip)
Converts a structIP to an int[4] |
static java.lang.String |
structIPtoString(structIP ip)
Converts a structIP to a String e.g. |
static java.util.Hashtable<X2XProxy,java.util.Vector<structBandwidthInfo>> |
vectorStructBwInfoToBeanVector(java.util.Hashtable<X2XProxy,java.util.Vector<StructBandwidthInfoBean>> loadedBwsPerNode)
Converts the vector with structBandwidthInfo elements to a vector with structBandwidthInfoBean elements. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Converter()
| Method Detail |
|---|
public static int ipArrToInt(int[] ip)
throws java.lang.Exception
ip -
java.lang.Exception
public static structIP ipArrToStructIP(int[] ip)
throws java.lang.Exception
structIP
ip -
java.lang.Exceptionpublic static int[] structIPtoIPArr(structIP ip)
structIP to an int[4]
ip -
public static java.lang.String structIPtoString(structIP ip)
ip -
public static java.lang.String ipArrtoString(int[] ipArr)
ipArr -
public static int[] stringToIPArr(java.lang.String ip)
throws java.lang.Exception
ip -
java.lang.Exception - - if the it was not possible to parse the ip from the String
public static int[] byteIPArrToIntIPArr(byte[] ip)
throws java.lang.Exception
ip -
java.lang.Exception
public static double colorToDouble(java.awt.Color c)
throws java.lang.Exception
c -
java.lang.Exceptionpublic static java.lang.String bpsToString(double bps)
bps - - float representing a value in bits per second
public static double stringToBps(java.lang.String s)
s - - String representing a value in bit/s, kbit/s, Mbit/s or Gbit/s
public static double scpStringToBps(java.lang.String s)
s - - String representing a value in Byte/s, KByte/s, MByte/s or GByte/s
2009-01-10 LEO: corrected, because scp measures in Byte/s and NOT in bit/s
public static structIP[] proxiesToStructIPs(java.util.Vector<X2XProxy> proxies)
proxies -
public static java.util.Hashtable<X2XProxy,java.util.Vector<structBandwidthInfo>> vectorStructBwInfoToBeanVector(java.util.Hashtable<X2XProxy,java.util.Vector<StructBandwidthInfoBean>> loadedBwsPerNode)
structBandwidthInfo elements to a vector with structBandwidthInfoBean elements.
loadedBwsPerNode -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||