|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mobicents.slee.resource.parlay.util.Convert
public class Convert
Convert is a utility that provides conversion functions for java types.
For example converting a byte[] to a hex string.
| Method Summary | |
|---|---|
static boolean |
assertEquals(byte[] b1,
byte[] b2)
Compares two byte arrays and returns true if they are equal |
static byte[] |
fromHexString(java.lang.String s)
Convert a hex string to a byte array. |
static byte[] |
toByteArray(int x)
Creates a four byte array from an integer. |
static java.lang.String |
toHexString(byte b)
convert a byte b to 2-char hex string with possible leading zero. |
static java.lang.String |
toHexString(byte[] b)
Fast convert a byte array to a hex string with possible leading zero. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.String toHexString(byte b)
b - byte to be converted
public static java.lang.String toHexString(byte[] b)
b - hex string rep in byte array
public static byte[] fromHexString(java.lang.String s)
s - String must have even number of characters.
and be formed only of digits 0-9 A-F or a-f. No spaces, minus or plus signs.
public static boolean assertEquals(byte[] b1,
byte[] b2)
b1 - the first byte arrayb2 - the second byte array
public static byte[] toByteArray(int x)
x - the integer to convert
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||