|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.ibm.awb.misc.Hexadecimal
The Hexadecimal class
| Constructor Summary | |
Hexadecimal(byte num)
Constructs a hexadecimal number with a byte. |
|
Hexadecimal(int num)
Constructs a hexadecimal number with a integer. |
|
Hexadecimal(short num)
Constructs a hexadecimal number with a short integer. |
|
| Method Summary | |
byte |
byteValue()
Gets a byte value. |
java.lang.String |
hexadecimalValue()
Gets a string in hexadecimal notation. |
int |
intValue()
Gets a integer value. |
static void |
main(java.lang.String[] args)
|
static int |
octetValue(char c0,
char c1)
Converts a pair of characters as an octet in hexadecimal notation into integer. |
static byte |
parseByte(java.lang.String hex)
Converts a string in hexadecimal notation into byte. |
static int |
parseInt(java.lang.String hex)
Converts a string in hexadecimal notation into integer. |
static byte[] |
parseSeq(java.lang.String str)
Converts a string in hexadecimal notation into byte sequence. |
static byte[] |
parseSeq(java.lang.String str,
java.lang.String delimiters)
Converts a string in hexadecimal notation into byte sequence. |
static short |
parseShort(java.lang.String hex)
Converts a string in hexadecimal notation into short integer. |
short |
shortValue()
Gets a short integer value. |
static java.lang.String |
valueOf(byte num)
Converts a byte into its hexadecimal notation. |
static java.lang.String |
valueOf(byte[] seq)
Converts a byte sequence into its hexadecimal notation. |
static java.lang.String |
valueOf(byte[] seq,
char separator)
Converts a byte sequence into its hexadecimal notation. |
static java.lang.String |
valueOf(byte num,
boolean padding)
Converts a byte into its hexadecimal notation. |
static java.lang.String |
valueOf(int num)
Converts a integer into its hexadecimal notation. |
static java.lang.String |
valueOf(int num,
boolean padding)
Converts a integer into its hexadecimal notation. |
static java.lang.String |
valueOf(long num)
Converts a long integer into its hexadecimal notation. |
static java.lang.String |
valueOf(long num,
boolean padding)
Converts a long integer into its hexadecimal notation. |
static java.lang.String |
valueOf(short num)
Converts a short integer into its hexadecimal notation. |
static java.lang.String |
valueOf(short num,
boolean padding)
Converts a short integer into its hexadecimal notation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Hexadecimal(byte num)
num - a bytepublic Hexadecimal(int num)
num - a integerpublic Hexadecimal(short num)
num - a short integer| Method Detail |
public byte byteValue()
throws java.lang.NumberFormatException
public java.lang.String hexadecimalValue()
public int intValue()
throws java.lang.NumberFormatException
public static void main(java.lang.String[] args)
public static int octetValue(char c0,
char c1)
throws java.lang.NumberFormatException
c0 - higher character of given octet in hexadecimal notationc1 - lower character of given octet in hexadecimal notation
public static byte parseByte(java.lang.String hex)
throws java.lang.NumberFormatException
hex - string in hexadecimal notation
public static int parseInt(java.lang.String hex)
throws java.lang.NumberFormatException
hex - string in hexadecimal notation
public static byte[] parseSeq(java.lang.String str)
throws java.lang.NumberFormatException
str - a string in hexadecimal notation
public static byte[] parseSeq(java.lang.String str,
java.lang.String delimiters)
throws java.lang.NumberFormatException
str - a string in hexadecimal notationdelimiters - a set of delimiters
public static short parseShort(java.lang.String hex)
throws java.lang.NumberFormatException
hex - string in hexadecimal notation
public short shortValue()
throws java.lang.NumberFormatException
public static java.lang.String valueOf(byte[] seq)
seq - a byte sequence
public static java.lang.String valueOf(byte[] seq,
char separator)
seq - a byte sequenceseparator - separator between bytespublic static java.lang.String valueOf(byte num)
num - a byte (1bytes)
public static java.lang.String valueOf(byte num,
boolean padding)
num - a byte (1bytes)padding - fit the length to 2 by filling with '0' when padding is truepublic static java.lang.String valueOf(int num)
num - a integer (4bytes)
public static java.lang.String valueOf(int num,
boolean padding)
num - a integer (4bytes)padding - fit the length to 8 by filling with '0' when padding is truepublic static java.lang.String valueOf(long num)
num - a long integer (8bytes)
public static java.lang.String valueOf(long num,
boolean padding)
num - a long integer (8bytes)padding - fit the length to 16 by filling with '0' when padding is truepublic static java.lang.String valueOf(short num)
num - a short integer (2bytes)
public static java.lang.String valueOf(short num,
boolean padding)
num - a short integer (2bytes)padding - fit the length to 8 by filling with '0' when padding is true
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||