(byte[] input)
| 145 | * Print a byte[], for debug purposes. |
| 146 | */ |
| 147 | public static void printByteArray(byte[] input) |
| 148 | { |
| 149 | for (int i = 0; i < input.length; i++ ) { |
| 150 | System.out.format("%02X ", input[i]); |
| 151 | } |
| 152 | System.out.println(); |
| 153 | } |
| 154 | |
| 155 | /* Based on http://snippets.dzone.com/posts/show/93 */ |
| 156 | public static byte[] intToByteArray(int input) |