|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--opencard.core.util.HexString
Small utility class to hexify bytes and shorts.
Field Summary | |
protected static java.lang.String[] |
hexChars
Auxillary string array. |
Constructor Summary | |
HexString()
|
Method Summary | |
static java.lang.String |
dump(byte[] data)
Hex-dump a byte array (offset and printable ASCII included) |
static java.lang.String |
dump(byte[] data,
int offset,
int len)
Hex-dump a byte array (offset and printable ASCII included) |
static java.lang.String |
hexify(byte[] data)
Hexify a byte array. |
static java.lang.String |
hexify(int val)
Hexify a byte value. |
static java.lang.String |
hexifyShort(byte a,
byte b)
Hexify short value encoded in two bytes. |
static java.lang.String |
hexifyShort(int val)
Hexify a short value. |
static java.lang.String |
hexifyShort(int a,
int b)
Hexify short value encoded in two (int-encoded)bytes. |
static byte[] |
parseHexString(java.lang.String byteString)
Parse bytes encoded as Hexadecimals into a byte array. |
static byte[] |
parseLittleEndianHexString(java.lang.String byteString)
Parse string of Hexadecimals into a byte array suitable for unsigned BigInteger computations. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected static final java.lang.String[] hexChars
Constructor Detail |
public HexString()
Method Detail |
public static java.lang.String dump(byte[] data)
data
- Byte array to convert to HexStringpublic static java.lang.String dump(byte[] data, int offset, int len)
data
- Byte array to convert to HexStringoffset
- Start dump herelen
- Number of bytes to be dumped.public static java.lang.String hexify(byte[] data)
data
- Byte array to convert to HexStringpublic static java.lang.String hexify(int val)
val
- Byte value to be displayed as a HexString.public static java.lang.String hexifyShort(byte a, byte b)
a
- High byte of short value to be hexifiedb
- Low byte of short value to be hexifiedpublic static java.lang.String hexifyShort(int val)
val
- Short value to be displayed as a HexString.public static java.lang.String hexifyShort(int a, int b)
a
- High byte of short value to be hexifiedb
- Low byte of short value to be hexifiedpublic static byte[] parseHexString(java.lang.String byteString)
byteString
- String containing HexBytes.public static byte[] parseLittleEndianHexString(java.lang.String byteString)
byteString
- String containing HexBytes.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |