|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jaccal.util.NumUtil
A utility class mainly used for display of bytes to string and vice versa
Field Summary | |
private static char[] |
hexChar
|
private static String |
hexits
|
Constructor Summary | |
NumUtil()
|
Method Summary | |
static int |
getUnsignedValue(byte b)
Get the unsigned value of a byte. |
static String |
hex2String(byte[] b)
Convert a byte array into its hexadecimal string representation. |
static int |
HexToDec(int hex)
Convert from hexadecimal base to decimal base. |
static byte[] |
int2ByteArray(int inCode)
Convert an integer into a byte array. |
static String |
int2HexString(int in)
Convert an integer into its hexadecimal String representation. |
static String |
toHexString(byte[] b)
Convert a byte array into its hexadecimal string representation. |
static byte[] |
toStringHex(String s)
Convert a String (hexadecimal representation of a bytes) into a byte array. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static char[] hexChar
private static String hexits
Constructor Detail |
public NumUtil()
Method Detail |
public static String toHexString(byte[] b)
b
- the byte array to convert into a String
public static String hex2String(byte[] b)
b
-
public static int HexToDec(int hex)
hex
-
public static byte[] toStringHex(String s)
s
- the String to convert
public static byte[] int2ByteArray(int inCode)
inCode
-
public static String int2HexString(int in)
in
-
public static int getUnsignedValue(byte b)
b
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |