(byte bytes[])
| 309 | } |
| 310 | |
| 311 | public static String toHex(byte bytes[]) { |
| 312 | StringBuffer strbuf = new StringBuffer(bytes.length * 2); |
| 313 | for (int index = 0; index < bytes.length; index++) { |
| 314 | |
| 315 | int bt = bytes[index] & 0xff; |
| 316 | if (bt < 0x10) { |
| 317 | |
| 318 | strbuf.append("0"); |
| 319 | } |
| 320 | strbuf.append(Integer.toHexString(bt)); |
| 321 | } |
| 322 | return strbuf.toString(); |
| 323 | } |
| 324 | |
| 325 | } |
no test coverage detected