au.net.aba.test
Class ByteUtil
java.lang.Object
|
+--au.net.aba.test.ByteUtil
- public class ByteUtil
- extends java.lang.Object
A utility class for processing arrays of bytes.
|
Field Summary |
static java.lang.String |
ident
|
|
Method Summary |
static java.lang.String |
bytesToHexStr(byte[] bcd)
Transform the specified byte into a Hex String form. |
static byte[] |
hexStrToBytes(java.lang.String s)
Transform the specified Hex String into a byte array. |
static void |
printHexBlock(java.lang.String s,
byte[] b)
print out a hex block, 20 bytes per line, with numbering down
one side. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ident
public static final java.lang.String ident
ByteUtil
public ByteUtil()
bytesToHexStr
public static final java.lang.String bytesToHexStr(byte[] bcd)
- Transform the specified byte into a Hex String form.
- Parameters:
bcd - The byte to transform.- Returns:
- The Hex String.
printHexBlock
public static void printHexBlock(java.lang.String s,
byte[] b)
- print out a hex block, 20 bytes per line, with numbering down
one side.
hexStrToBytes
public static final byte[] hexStrToBytes(java.lang.String s)
- Transform the specified Hex String into a byte array.
- Parameters:
s - the hex string to convert.- Returns:
- The resulting byte array.